/* ==========================================================================
   Identidad VendeAuto: fondo blanco, negro del logo y turquesa de marca.
   El turquesa se usa en superficies (botones, franjas, insignias) con texto
   negro; para enlaces sobre blanco se usa su variante oscura (contraste AA).
   ========================================================================== */
:root {
  --ac-dark: #121212;
  --ac-brand: #1CB5BC;
  --ac-brand-d: #0B7F86;     /* texto y enlaces turquesa sobre blanco */
  --ac-brand-h: #179FA6;     /* hover de botones */
  --ac-brand-soft: #E8F7F8;  /* fondos suaves de selección */
  --ac-ink: #121212;
  --ac-steel: #5B6670;
  --ac-mist: #F5F7F8;
  --ac-line: #E3E7EA;
  --ac-radius: 12px;
  --bs-body-font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--ac-ink);
  --bs-body-bg: #fff;
  --bs-link-color-rgb: 11, 127, 134;
  --bs-link-hover-color-rgb: 18, 18, 18;
  --bs-border-color: var(--ac-line);
}

body { font-size: 1rem; line-height: 1.6; background: #fff; }
h1, h2, h3, .page-title, .hero-title, .display-cta, .footer-brand, .stat-value, .plan-price, .error-code,
.vehicle-title, .vehicle-price, .vcard-price, .plan-mini-price, .choice-title {
  font-family: "Lexend", "Figtree", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -.015em;
}
a { text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--ac-brand); outline-offset: 2px; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }
.text-action { color: var(--ac-brand-d); }

/* Botones */
.btn { border-radius: 10px; font-weight: 600; }
.btn-action { background: var(--ac-brand); border-color: var(--ac-brand); color: var(--ac-dark); }
.btn-action:hover, .btn-action:focus, .btn-action:active { background: var(--ac-brand-h); border-color: var(--ac-brand-h); color: var(--ac-dark); }
.btn-outline-ink { border: 2px solid var(--ac-dark); color: var(--ac-dark); }
.btn-outline-ink:hover { background: var(--ac-dark); color: #fff; }
.btn-ghost { color: var(--ac-dark); border: 1px solid var(--ac-line); background: #fff; }
.btn-ghost:hover, .btn-ghost.show { border-color: var(--ac-dark); color: var(--ac-dark); background: #fff; }

/* Encabezado blanco */
.site-header { background: #fff; border-bottom: 1px solid var(--ac-line); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { padding: .7rem 0; }
.brand { display: flex; align-items: center; text-decoration: none; margin-right: 2rem; }
.brand-logo { height: 30px; width: auto; display: block; }
.site-header .nav-link { color: var(--ac-steel); font-weight: 500; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--ac-dark); }
.site-header .nav-link.active { box-shadow: inset 0 -3px 0 var(--ac-brand); }
.navbar-toggler { color: var(--ac-dark); border-color: var(--ac-line); }

/* Línea de pista turquesa: el elemento distintivo de la marca */
.lane { height: 5px; background: repeating-linear-gradient(90deg, var(--ac-brand) 0 48px, transparent 48px 80px); }

/* Hero y buscador */
.hero { background: #fff; color: var(--ac-ink); padding: 3.5rem 0 0; position: relative; }
.hero .lane { margin-top: 3rem; }
.hero-title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.05; margin-bottom: 1rem; max-width: 16ch; font-weight: 700; }
.hero-lead { color: var(--ac-steel); font-size: 1.15rem; max-width: 46ch; }
.search-panel { background: #fff; color: var(--ac-ink); border: 1px solid var(--ac-line); border-top: 4px solid var(--ac-brand);
  border-radius: var(--ac-radius); padding: 1.5rem; margin-top: 2rem; box-shadow: 0 18px 40px -24px rgba(18, 18, 18, .35); }
.search-panel .form-label, .filter-panel .form-label { font-size: .85rem; font-weight: 600; color: var(--ac-steel); margin-bottom: .3rem; }
.link-more { color: var(--ac-dark); font-weight: 600; text-decoration: none; }

/* Secciones */
.section { padding: 3.5rem 0; }
.section-mist { background: var(--ac-mist); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2, .section-title { font-size: 1.75rem; margin: 0; }
.page-title { font-size: 2rem; margin-bottom: .75rem; }
.display-cta { font-size: clamp(2rem, 3.6vw, 2.75rem); }

/* Tarjetas de vehículos */
.vgrid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.vgrid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.vcard { border: 1px solid var(--ac-line); border-radius: var(--ac-radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.vcard.is-featured { border-color: var(--ac-brand); box-shadow: inset 0 4px 0 var(--ac-brand); }
.vcard-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--ac-mist); }
.vcard-media img { width: 100%; height: 100%; object-fit: cover; }
.badge-featured { position: absolute; top: .6rem; left: .6rem; background: var(--ac-brand); color: var(--ac-dark); font-size: .78rem; font-weight: 600; padding: .25rem .55rem; border-radius: 6px; }
.vcard-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; }
.vcard-title { font-size: 1.3rem; margin: 0; }
.vcard-title a { color: var(--ac-ink); text-decoration: none; }
.vcard-title a:hover { color: var(--ac-brand-d); }
.vcard-price { font-family: "Lexend", sans-serif; font-size: 1.55rem; font-weight: 700; color: var(--ac-dark); margin: 0; }
.vcard-old { font-size: 1rem; color: var(--ac-steel); font-weight: 600; margin-left: .35rem; }
.vcard-specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .9rem; color: var(--ac-steel); }
.vcard-place { font-size: .88rem; color: var(--ac-steel); margin: .2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.vcard-seller { margin-left: auto; font-size: .78rem; font-weight: 600; color: var(--ac-dark); background: var(--ac-mist); border-radius: 4px; padding: .1rem .45rem; }

/* Chips de categorías y marcas */
.chip-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { display: inline-flex; gap: .5rem; align-items: center; padding: .6rem 1rem; border-radius: 999px; background: #fff;
  border: 1px solid var(--ac-line); color: var(--ac-ink); text-decoration: none; font-weight: 500; }
.chip:hover { border-color: var(--ac-dark); color: var(--ac-dark); }
.chip i { color: var(--ac-brand-d); }

/* Planes */
.plan-mini, .plan-card { border: 1px solid var(--ac-line); border-radius: var(--ac-radius); padding: 1.25rem; background: #fff; height: 100%; }
.plan-mini-name, .plan-name { font-weight: 600; margin-bottom: .2rem; font-size: 1.05rem; font-family: "Figtree", sans-serif; }
.plan-mini-price { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 1.8rem; color: var(--ac-dark); margin-bottom: .25rem; }
.plan-name { font-size: 1.15rem; }
.plan-price { font-size: 2.4rem; color: var(--ac-dark); margin-bottom: .5rem; }
.plan-price span { font-family: "Figtree", sans-serif; font-size: .9rem; font-weight: 500; color: var(--ac-steel); }
.plan-card.is-free { background: var(--ac-mist); }
.plan-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.plan-list li { padding: .35rem 0 .35rem 1.6rem; position: relative; border-top: 1px solid var(--ac-line); }
.plan-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; color: var(--ac-brand-d); }

/* Filtros */
.filter-panel { background: var(--ac-mist); border-radius: var(--ac-radius); padding: 1.25rem; }
@media (max-width: 991.98px) { .filter-panel { background: transparent; padding: 0; } }

/* Estados vacíos */
.empty-state { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--ac-line); border-radius: var(--ac-radius); }
.empty-state > i { font-size: 2.4rem; color: var(--ac-steel); margin-bottom: .8rem; }

/* Formularios de acceso */
.auth-card { max-width: 440px; margin: 0 auto; background: #fff; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); padding: 2rem; }
.auth-card-wide { max-width: 760px; }
.form-section { font-size: 1.35rem; margin: 1.75rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--ac-line); }
.form-section:first-of-type { border-top: 0; padding-top: 0; margin-top: .5rem; }
.choice-card { display: flex; flex-direction: column; gap: .4rem; padding: 2rem; height: 100%; border: 2px solid var(--ac-line); border-radius: var(--ac-radius);
  text-decoration: none; color: var(--ac-ink); background: #fff; }
.choice-card:hover { border-color: var(--ac-brand); }
.choice-card > i { font-size: 1.8rem; color: var(--ac-brand); }
.choice-title { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 1.7rem; }
.choice-text { color: var(--ac-steel); }

/* Paneles de cuenta y admin */
.side-nav { background: var(--ac-mist); border-radius: var(--ac-radius); padding: 1rem; position: sticky; top: 5.5rem; }
.side-nav-title { font-weight: 600; color: var(--ac-steel); font-size: .9rem; margin: 0 0 .5rem .5rem; }
.side-nav-note { font-size: .8rem; color: var(--ac-steel); margin: 1rem .5rem 0; }
.side-link { display: flex; gap: .65rem; align-items: center; padding: .55rem .6rem; border-radius: 6px; color: var(--ac-ink); text-decoration: none; font-weight: 500; }
.side-link i { width: 1.1rem; color: var(--ac-steel); }
.side-link:hover { background: #fff; }
.side-link.active { background: var(--ac-dark); color: #fff; }
.side-link.active i { color: var(--ac-brand); }
.panel { background: #fff; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); padding: 1.4rem; }
.panel-title { font-size: 1.45rem; margin-bottom: .8rem; }
.stat { display: block; background: #fff; border: 1px solid var(--ac-line); border-left: 4px solid var(--ac-dark); border-radius: 8px; padding: .9rem 1rem; height: 100%; text-decoration: none; color: inherit; }
.stat-accent { border-left-color: var(--ac-brand); }
.stat-value { font-size: 1.9rem; line-height: 1; margin: 0 0 .3rem; color: var(--ac-dark); }
.stat-label { font-size: .85rem; color: var(--ac-steel); margin: 0; }
.stat-link:hover { background: var(--ac-mist); }
.is-admin .site-header .container { max-width: none; padding: 0 1.5rem; }

/* Páginas legales y errores */
.legal-body { max-width: 72ch; }
.error-code { font-size: 6rem; color: var(--ac-brand); line-height: 1; margin-bottom: 0; font-weight: 700; }

/* Pie claro (fondo blanco del sitio) */
.site-footer { background: var(--ac-mist); color: var(--ac-ink); margin-top: 3rem; border-top: 1px solid var(--ac-line); }
.footer-logo { height: 28px; width: auto; margin-bottom: .8rem; }
.footer-heading { font-weight: 600; margin-bottom: .6rem; }
.footer-links a { color: var(--ac-steel); text-decoration: none; line-height: 2; }
.footer-links a:hover { color: var(--ac-dark); text-decoration: underline; }
.footer-muted { color: var(--ac-steel); }
.footer-social a { color: var(--ac-dark); }
.footer-social a:hover { color: var(--ac-brand-d); }

.pagination .page-link { color: var(--ac-dark); }
.pagination .active .page-link { background: var(--ac-dark); border-color: var(--ac-dark); color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--ac-brand); box-shadow: 0 0 0 .2rem rgba(28, 181, 188, .25); }
.form-check-input:checked { background-color: var(--ac-brand-d); border-color: var(--ac-brand-d); }
.nav-pills .nav-link.active { background: var(--ac-dark); }
.nav-pills .nav-link { color: var(--ac-ink); }
.accordion-button:not(.collapsed) { background: var(--ac-brand-soft); color: var(--ac-ink); }
.bar-chart .bar { background: var(--ac-brand); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ===== Etapas 2 a 7 ===== */
.brand-logo { max-height: 40px; width: auto; }
.badge-dot { position: absolute; top: -4px; right: -4px; background: var(--ac-brand); color: var(--ac-dark); font-size: .68rem; border-radius: 999px; padding: .05rem .38rem; }
.btn-whatsapp { background: #1FAF55; border-color: #1FAF55; color: #fff; }
.btn-whatsapp:hover { background: #178F45; border-color: #178F45; color: #fff; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.prose { white-space: normal; overflow-wrap: anywhere; max-width: 75ch; }

/* Detalle del vehículo */
.gallery .carousel { border-radius: var(--ac-radius); overflow: hidden; background: #0b1626; }
.gallery .carousel-item img { aspect-ratio: 4 / 3; object-fit: contain; background: #0b1626; }
.gallery-thumbs { display: flex; gap: .5rem; overflow-x: auto; padding: .6rem 0; }
.gallery-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 6px; background: none; flex: 0 0 auto; }
.gallery-thumbs button:focus-visible, .gallery-thumbs button:hover { border-color: var(--ac-brand); }
.gallery-thumbs img { width: 88px; height: 66px; object-fit: cover; border-radius: 4px; }
.vehicle-title { font-size: 1.9rem; line-height: 1.05; margin-bottom: .35rem; }
.vehicle-price { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 2.4rem; color: var(--ac-dark); margin: 0 0 .25rem; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem 1.25rem; margin: 0; }
.spec-grid dt { font-size: .82rem; font-weight: 600; color: var(--ac-steel); }
.spec-grid dd { margin: 0; font-weight: 500; }
.seller-box { display: flex; gap: .8rem; align-items: center; padding: .9rem; background: var(--ac-mist); border-radius: 8px; }
.seller-logo { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 6px; }

/* Publicación */
.wizard-steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: step; flex-wrap: wrap; }
.wizard-steps li { counter-increment: step; padding: .4rem .9rem; border-radius: 999px; background: var(--ac-mist); color: var(--ac-steel); font-size: .9rem; font-weight: 500; }
.wizard-steps li::before { content: counter(step) ". "; }
.wizard-steps li.active { background: var(--ac-dark); color: #fff; }
.wizard-steps li.done { background: #E4F3EA; color: #1E6B3A; }
.wizard-steps a { color: inherit; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.photo-item { margin: 0; border: 2px solid var(--ac-line); border-radius: 8px; overflow: hidden; background: #fff; }
.photo-item.is-primary { border-color: var(--ac-brand); }
.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-item figcaption { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; align-items: center; }
.photo-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.photo-preview img { width: 90px; height: 68px; object-fit: cover; border-radius: 4px; }
.my-vehicle { display: flex; gap: 1rem; align-items: flex-start; }
@media (max-width: 575.98px) { .my-vehicle { flex-direction: column; } .my-vehicle > img { width: 100%; height: auto; } }
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; border-bottom: 1px solid var(--ac-line); }
.bar-chart .bar { flex: 1; background: var(--ac-dark); border-radius: 3px 3px 0 0; min-width: 4px; }
.option-card { display: flex; gap: .9rem; align-items: center; padding: 1rem; border: 2px solid var(--ac-line); border-radius: 8px; margin-bottom: .6rem; cursor: pointer; }
.option-card:has(input:checked) { border-color: var(--ac-brand); background: var(--ac-brand-soft); }

/* Automotoras */
.dealer-card, .dealer-tile { display: flex; gap: .9rem; align-items: center; padding: 1rem; border: 1px solid var(--ac-line); border-radius: var(--ac-radius); background: #fff; color: var(--ac-ink); text-decoration: none; height: 100%; }
.dealer-tile { flex-direction: column; text-align: center; gap: .3rem; }
.dealer-card:hover, .dealer-tile:hover { border-color: var(--ac-dark); }
.dealer-card-logo, .dealer-hero-logo { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; background: var(--ac-mist); border-radius: 8px; font-size: 1.5rem; color: var(--ac-steel); }
.dealer-hero-logo { width: 110px; height: 110px; flex-basis: 110px; font-size: 2.4rem; }
.dealer-card-logo img, .dealer-hero-logo img, .dealer-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dealer-tile img { height: 56px; }
.dealer-tile i { font-size: 2rem; color: var(--ac-steel); }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }

/* Publicidad */
.ad-slot { position: relative; text-align: center; margin: 1rem 0; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 6px; }
.ad-label { display: block; font-size: .7rem; color: var(--ac-steel); margin-bottom: .2rem; }

/* Admin y varios */
.list-scroll { max-height: 520px; overflow-y: auto; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .7rem; }
.badge-brand { background: var(--ac-brand); color: var(--ac-dark); }
h1, h2, h3, h4, h5, h6 { color: var(--ac-ink); --bs-heading-color: var(--ac-ink); }
.site-header .nav-link, .site-header .btn { white-space: nowrap; }
@media (max-width: 1199.98px) { .site-header .navbar-collapse { padding: .75rem 0; } }
@media (max-width: 575.98px) { .search-panel .btn-action { width: 100%; } .search-panel .btn-lg { font-size: 1.05rem; } }

/* Aviso de cookies */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080; padding: 0 0 1rem; pointer-events: none; }
.cookie-inner { pointer-events: auto; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--ac-line); border-top: 4px solid var(--ac-brand); border-radius: var(--ac-radius);
  padding: 1rem 1.25rem; box-shadow: 0 20px 45px -20px rgba(18, 18, 18, .45); }
.cookie-text { flex: 1 1 420px; font-size: .95rem; }
.cookie-title { font-family: "Lexend", sans-serif; font-weight: 600; margin-bottom: .25rem; }
.cookie-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 575.98px) { .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1; } }

/* Logo y favicon en configuración */
.brand-assets { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: .5rem; }
.brand-preview { display: flex; align-items: center; min-height: 64px; padding: .75rem; margin-bottom: .5rem; background: #fff;
  border: 1px dashed var(--ac-line); border-radius: 8px; }
