/* DONAUTO conversion components: mobile action bar, lead forms, cookie banner,
   sold-car block, model landing pages. Loaded after style.css. */
:root {
    --da-bg: #0d0d0d;
    --da-surface: #151515;
    --da-surface-2: #191919;
    --da-line: rgba(214, 214, 214, .12);
    --da-text: #d6d6d6;
    --da-soft: #a3a3a3;
    --da-accent: #c9900d;
    --da-wa: #25d366;
    --da-wa-dark: #128c4b;
    --da-error: #ff6b5b;
    --da-bar-h: 60px;
    --da-safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- mobile action bar ---------- */
.da-sticky-bar { display: none; }

@media (max-width: 991px) {
    .da-sticky-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9990;
        display: flex;
        gap: 8px;
        padding: 8px 12px calc(8px + var(--da-safe-b));
        background: rgba(13, 13, 13, .96);
        border-top: 1px solid var(--da-line);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        /* hidden until the page's own CTAs are scrolled away (html.da-sb-on, set in sticky_bar.blade.php) */
        transform: translateY(105%);
        visibility: hidden;
        transition: transform .28s ease, visibility 0s linear .28s;
    }
    .da-sb-on .da-sticky-bar {
        transform: none;
        visibility: visible;
        transition: transform .28s ease, visibility 0s;
    }
    .da-sticky-bar a {
        flex: 1 1 50%;
        min-width: 0;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 6px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .02em;
        text-decoration: none;
        white-space: nowrap;
    }
    .da-sticky-bar i { font-size: 20px; }
    .da-sb-wa { background: var(--da-wa); color: #06210f; }
    .da-sb-call { background: var(--da-surface-2); color: var(--da-text); border: 1px solid var(--da-line); }

    /* keep the end of the page reachable above the bar */
    body { padding-bottom: calc(var(--da-bar-h) + var(--da-safe-b)); }

    /* AI chat button sits above the bar */
    #donauto-chat-btn { transition: bottom .28s ease; }
    .da-sb-on #donauto-chat-btn { bottom: calc(var(--da-bar-h) + var(--da-safe-b) + 12px) !important; }
    .da-sb-on #donauto-chat-box { bottom: calc(var(--da-bar-h) + var(--da-safe-b) + 80px) !important; }
}

/* ---------- WhatsApp buttons ---------- */
/* WhatsApp next to the gold button: outlined, no green fill; the green stays on the icon */
.da-btn-wa {
    background-color: transparent !important;
    color: #eaeaea !important;
    box-shadow: inset 0 0 0 1px var(--da-wa);
    gap: 14px;
}
.da-btn-wa span { color: inherit !important; }
.da-btn-wa i { font-size: 1.6em; color: var(--da-wa); }
.da-btn-wa:hover { box-shadow: inset 0 0 0 2px var(--da-wa); background-color: rgba(37, 211, 102, .08) !important; color: #fff !important; }
/* hero: the two buttons always the same size */
.da-hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.da-hero-ctas .mil-btn { flex: 0 0 380px; width: 380px; height: 64px; padding: 0 32px; justify-content: center; }
@media (max-width: 575px) {
    .da-hero-ctas { gap: 12px 28px; }
    .da-hero-ctas .mil-btn { flex: 1 1 100%; width: 100%; }
}

/* ---------- lead forms ---------- */
.da-lead {
    background: var(--da-surface);
    border: 1px solid var(--da-line);
    border-radius: 12px;
    padding: 28px 24px;
    scroll-margin-top: 90px;
}
.da-lead .grid { margin-top: 0; }
.da-field { display: block; margin-bottom: 14px; }
.da-field .mil-label {
    display: block;
    margin-bottom: 8px;
    line-height: 1.2;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: .25rem;
    font-weight: 600;
    color: var(--da-text);
}
.da-lead textarea.mil-input,
.mil-contact-form-wrap textarea.mil-input { height: auto; min-height: 9rem; padding: 1.6rem 2rem; resize: vertical; }
.da-lead input.mil-input { text-align: left; border-left: none; width: 100%; font-size: 16px; }
.da-lead textarea.mil-input { font-size: 16px; }
.da-lead-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.da-lead-legal { font-size: 1.2rem; color: var(--da-soft); flex: 1 1 220px; line-height: 1.5; }
.da-lead-legal a { color: var(--da-text); }
.da-lead-errors {
    border: 1px solid var(--da-error);
    color: var(--da-error);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 1.4rem;
}
.da-lead-done { display: flex; gap: 16px; align-items: flex-start; }
.da-lead-done i { font-size: 32px; }
.mil-error { display: block; color: var(--da-error); margin-top: 6px; font-size: 1.3rem; }
.da-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* car page: form + buttons block */
.da-car-lead { padding-top: 4rem; padding-bottom: 4rem; }
.da-car-lead .mil-h1 { font-size: 3.6rem; }
@media (max-width: 768px) { .da-car-lead .mil-h1 { font-size: 2.6rem; } }

/* ---------- sold car ---------- */
.da-sold-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    background: rgba(192, 57, 43, .14);
    border: 1px solid rgba(192, 57, 43, .55);
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 2.4rem;
}
.da-sold-banner p { color: var(--da-text); font-weight: 600; font-size: 1.6rem; margin: 0; }
.da-sold-banner .da-sold-tag {
    background: #c0392b;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .3rem;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 6px 10px;
    margin-right: 10px;
}
.da-similar-grid .mil-catalog-card { height: 100%; }

/* ---------- cookie banner ---------- */
.da-consent {
    position: fixed;
    z-index: 100000;
    left: 16px;
    right: 16px;
    bottom: calc(16px + var(--da-safe-b));
    max-width: 560px;
    margin-left: auto;
    background: #141414;
    color: var(--da-text);
    border: 1px solid var(--da-line);
    border-radius: 12px;
    padding: 18px 18px 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
    font-size: 14px;
    line-height: 1.5;
}
.da-consent[hidden] { display: none; }
.da-consent-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; color: #fff; }
.da-consent-text { color: var(--da-soft); margin-bottom: 12px; }
.da-consent-text a { color: var(--da-text); text-decoration: underline; }
.da-consent-prefs { display: grid; gap: 8px; margin-bottom: 12px; }
.da-consent-prefs[hidden] { display: none; }
.da-consent-prefs label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.da-consent-prefs input { width: 18px; height: 18px; border: 0; accent-color: var(--da-accent); }
.da-consent-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.da-consent-btns .mil-btn { height: 42px; padding: 0 18px; letter-spacing: .15rem; flex: 1 1 auto; }
.da-consent-btns [hidden] { display: none !important; }
.da-btn-ghost { background-color: transparent !important; color: var(--da-text) !important; border: 1px solid var(--da-line) !important; }
.da-link-btn {
    background: none;
    border: 0;
    color: var(--da-soft);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 8px 4px;
}
@media (max-width: 991px) {
    /* above the action bar */
    .da-consent { left: 8px; right: 8px; bottom: calc(8px + var(--da-safe-b)); padding: 14px 14px 10px; font-size: 13px; transition: bottom .28s ease; }
    .da-sb-on .da-consent { bottom: calc(var(--da-bar-h) + var(--da-safe-b) + 8px); }
}

/* ---------- model landing pages ---------- */
.da-landing-intro { font-size: 1.7rem; line-height: 1.65; color: var(--da-soft); max-width: 80rem; }
.da-landing-intro p + p { margin-top: 1.2rem; }
.da-steps { counter-reset: dastep; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.da-step { background: var(--da-surface); border: 1px solid var(--da-line); border-radius: 10px; padding: 20px; }
.da-step::before {
    counter-increment: dastep;
    content: counter(dastep);
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--da-accent);
    color: #0d0d0d;
    font-weight: 800;
    margin-bottom: 10px;
}
.da-step h3 { font-size: 1.7rem; margin-bottom: 8px; line-height: 1.25; }
.da-step p { color: var(--da-soft); line-height: 1.55; }
.da-faq details { border-bottom: 1px solid var(--da-line); padding: 16px 0; }
.da-faq summary { cursor: pointer; color: var(--da-text); font-weight: 700; font-size: 1.6rem; list-style: none; }
.da-faq summary::-webkit-details-marker { display: none; }
.da-faq summary::after { content: "+"; float: right; color: var(--da-accent); font-size: 2rem; line-height: 1; }
.da-faq details[open] summary::after { content: "–"; }
.da-faq details p { margin-top: 10px; color: var(--da-soft); line-height: 1.6; }
.da-todo {
    background: rgba(201, 144, 13, .16);
    outline: 1px dashed var(--da-accent);
    color: #f0c75e;
    padding: 0 4px;
    border-radius: 3px;
}
.da-subnav { display: flex; flex-wrap: wrap; gap: 8px; }
.da-subnav a {
    border: 1px solid var(--da-line);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--da-text);
    text-decoration: none;
    font-size: 1.3rem;
}
.da-subnav a.is-current { border-color: var(--da-accent); color: var(--da-accent); }
.mil-logo img { height: auto; }
.da-lead .mil-input,
.da-lead textarea.mil-input { background-color: var(--da-surface-2) !important; color: var(--da-text) !important; border: 1px solid var(--da-line); border-radius: 4px; }
.da-lead .mil-input:focus { border-color: var(--da-accent); }
.da-btn-ghost span,
.da-btn-ghost:hover span { color: var(--da-text) !important; }

/* reCAPTCHA v3: badge hidden (it would sit on the sticky bar); the required notice is under each form. */
.grecaptcha-badge { visibility: hidden !important; }
.da-rc-note { margin-top: 12px; font-size: 12px; line-height: 1.4; opacity: .6; }
.da-rc-note a { text-decoration: underline; }

/* Cloudflare Turnstile (interaction-only: takes space only when a click is needed). */
.da-ts { margin: 4px 0 0; }
.da-ts:not(:empty) { margin-bottom: 16px; }

/* ---------- mobile menu: large rows with icons (theme switches to the overlay menu at 1200px) ---------- */
.da-mi { display: none; }
@media (max-width: 1200px) {
    .mil-menu { align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .mil-menu > ul { padding: 12px 16px 8px; margin-bottom: 0; }
    .mil-menu ul li { margin-bottom: 4px; }
    .mil-menu ul li a,
    .mil-menu ul li ul li a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        min-height: 68px;
        padding: 8px 12px;
        border-radius: 10px;
        text-align: left;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: 0;
        text-transform: none;
        color: #eaeaea !important;
        transition: background-color .15s;
    }
    .mil-menu ul li a:active { background: rgba(255, 255, 255, .06); }
    /* only while the menu is open: the closed overlay stays on the page (opacity 0) and must not catch taps */
    .mil-menu:not(.mil-active),
    .mil-menu:not(.mil-active) * { pointer-events: none !important; }
    .mil-menu.mil-active ul li.mil-has-children > a { pointer-events: auto; }
    .da-mi {
        display: inline-flex;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        align-items: center;
        justify-content: center;
        color: #c9900d;
    }
    .da-mi svg { width: 32px; height: 32px; }
    .da-ml { flex: 1 1 auto; min-width: 0; }
    /* sub-items always visible, indented under the parent */
    .mil-menu ul li ul {
        max-height: none;
        padding: 0 0 6px 28px;
        background: transparent;
    }
    .mil-menu.mil-active ul li ul { pointer-events: all; }
    .mil-menu ul li ul li,
    .mil-menu ul li ul li:first-child,
    .mil-menu ul li ul li:last-child { margin: 0 0 2px; }
    .mil-menu ul li ul li a { min-height: 58px; font-size: 20px; font-weight: 600; color: #cfcfcf !important; }
    .mil-menu ul li ul .da-mi { color: #a3a3a3; }
    .mil-menu ul li ul .da-mi svg { width: 26px; height: 26px; }
    .mil-menu ul li.mil-current > a { color: #c9900d !important; }
    .mil-menu ul li.mil-current > a .da-mi { color: #c9900d; }

    .mil-menu { flex-direction: column; justify-content: flex-start; }

    /* while the menu is open: no action bar / chat button over it, page doesn't scroll behind */
    html.da-menu-open { overflow: hidden; }
    html.da-menu-open .da-sticky-bar,
    html.da-menu-open #donauto-chat-btn { visibility: hidden !important; }
}

/* ---------- page photo gallery (opens in Fancybox) ---------- */
.da-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 992px) { .da-gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.da-gallery-item { display: block; overflow: hidden; border-radius: 8px; background: var(--da-surface); }
.da-gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.da-gallery-item:hover img { transform: scale(1.03); }

/* Fancybox open (cars and service galleries): nothing of ours on top of it */
html.with-fancybox .da-sticky-bar,
html.with-fancybox #donauto-chat-btn,
html.with-fancybox #donauto-chat-box,
html.with-fancybox .da-consent { visibility: hidden !important; }

/* ---------- service page: "¿Para más información?" buttons ---------- */
.da-svc-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.da-svc-cta .mil-btn { gap: 10px; }
@media (max-width: 575px) {
    .da-svc-cta .mil-btn { flex: 1 1 100%; width: 100%; padding: 0 16px; letter-spacing: .2rem; }
    .mil-cta h4.mil-h1 { font-size: 2.8rem; line-height: 120%; overflow-wrap: anywhere; }
}

/* car card: contact buttons, then similar cars, then the form */
.da-car-lead { padding-bottom: 2rem; }
.da-car-lead .mil-car-cta-buttons { gap: 12px; }
.da-car-lead-form { padding-top: 2rem; padding-bottom: 8rem; scroll-margin-top: 90px; }
.da-car-lead-form__inner { max-width: 820px; margin: 0 auto; }
.da-car-lead-form__inner.has-media {
    max-width: none; display: grid; grid-template-columns: 1fr 1fr;
    background: var(--da-surface); border: 1px solid var(--da-line); border-radius: 12px; overflow: hidden;
}
.da-car-lead-form__media { position: relative; min-height: 420px; }
.da-car-lead-form__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.da-car-lead-form__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(13,13,13,0) 35%, rgba(13,13,13,.6) 60%, rgba(13,13,13,.94) 100%);
}
.da-car-lead-form__caption { position: absolute; left: 32px; right: 32px; bottom: 28px; z-index: 1; }
.da-car-lead-form__caption .mil-h4 { color: #fff; }
.da-car-lead-form__brand {
    display: inline-block; margin-bottom: 10px; padding-left: 34px; position: relative;
    font-size: 1.1rem; letter-spacing: .3rem; text-transform: uppercase; font-weight: 600; color: #eaeaea;
}
.da-car-lead-form__brand::before {
    content: ""; position: absolute; left: 0; top: 50%; width: 24px; height: 8px; margin-top: -4px;
    background: var(--da-accent); transform: skewX(-30deg);
}
.has-media .da-lead { border: 0; border-radius: 0; background: transparent; padding: 40px 40px 36px; height: 100%; }
@media (max-width: 991px) {
    .da-car-lead-form__inner.has-media { grid-template-columns: 1fr; }
    .da-car-lead-form__media { min-height: 240px; }
    .da-car-lead-form__caption { left: 20px; right: 20px; bottom: 18px; }
    .has-media .da-lead { padding: 24px 20px; }
}

/* car cards in sliders and the catalog grid: equal height, price row pinned to the bottom */
.swiper-slide:has(> .mil-catalog-card) { height: auto; display: flex; }
.swiper-slide > .mil-catalog-card,
.col-12 > .mil-catalog-card { display: flex; flex-direction: column; width: 100%; height: 100%; }
.swiper-slide > .mil-catalog-card > .mil-descr,
.col-12 > .mil-catalog-card > .mil-descr { flex: 1 1 auto; display: flex; flex-direction: column; }
.swiper-slide > .mil-catalog-card .mil-item-text,
.col-12 > .mil-catalog-card .mil-item-text { flex: 1 1 auto; }
.swiper-slide > .mil-catalog-card .mil-descr > :last-child,
.col-12 > .mil-catalog-card .mil-descr > :last-child { min-height: 9.2rem; }
