/* Brissa Auto Group · base compartida (web pública y panel).
   2026-11-25: el dueño pidió SOLO AZUL Y NEGRO. Azul del logo (#12404D) como base, un azul vivo para
   acciones y brillos, negro profundo para secciones y textos, gris muy claro solo como fondo de lectura.
   Sin arena/beige. 2026-11-25 (2): negro de medianoche con matiz azul y cobalto como único acento. Rojo solo para «Rebajado» y errores. Contraste de textos >= 4.5:1 (medido).
   Letra (orden del dueño 2026-11-25): Poppins, la misma de la referencia, servida desde /fuentes (latin y latin-ext). */

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fuentes/poppins-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fuentes/poppins-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fuentes/poppins-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fuentes/poppins-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fuentes/poppins-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fuentes/poppins-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fuentes/poppins-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fuentes/poppins-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Negros de medianoche (con matiz azul, no gris plano), de más hondo a superficie */
  --negro: #050B12;
  --negro-2: #08121C;
  --negro-3: #0D1B28;
  --negro-4: #13263A;
  /* Azules: el del logo como base, cobalto como ÚNICO acento */
  --azul: #12404D;              /* el del logo */
  --azul-hondo: #0B2A33;
  --azul-vivo: #2563EB;         /* cobalto: botones y acentos sobre claro (blanco encima 5.2:1) */
  --azul-vivo-hondo: #1D4ED8;   /* al pasar / pulsar (6.7:1) */
  --azul-brillo: #5B9BFF;       /* texto y brillos sobre negro (7.1:1) */
  --azul-tenue: #E1EAF8;        /* fondo de apoyo claro */
  /* Neutros de lectura */
  --claro: #EEF2F6;
  --blanco: #FFFFFF;
  --tinta: #07111A;
  --tinta-suave: #4A5B6B;       /* 6.2:1 sobre --claro */
  --sobre-negro: #E6EDF5;
  --sobre-negro-suave: #A3B3C2; /* 9.2:1 sobre --negro */
  --rojo: #C62828;
  --verde-ok: #1E6B45;

  /* Nombres antiguos (los usa el panel): apuntan a la paleta nueva */
  --c-primario: var(--azul);
  --c-primario-hondo: var(--azul-hondo);
  --c-primario-suave: var(--azul-tenue);
  --c-secundario: #E6EDF1;
  --c-fondo: var(--claro);
  --c-superficie: var(--blanco);
  --c-texto: var(--tinta);
  --c-texto-suave: var(--tinta-suave);
  --c-texto-sobre-azul: #C9D6DC;
  --c-acento: var(--rojo);
  --c-exito: var(--verde-ok);
  --c-borde-campo: #B9C6CD;
  --c-foco: var(--azul-vivo);
  --sombra-flota: 0 16px 40px rgba(5, 11, 18, .32);

  --f-titulo: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-texto: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Cinco tamaños (más el precio): chico · texto · entrada · título · pantalla */
  --t-chico: .875rem;
  --t-base: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --t-lead: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
  --t-h2: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --t-display: clamp(2.5rem, 1rem + 6.4vw, 7rem);
  --t-precio: clamp(1.375rem, 1.2rem + .6vw, 1.75rem);

  --e-1: 8px; --e-2: 16px; --e-3: 24px; --e-4: 32px; --e-5: 48px; --e-6: 64px; --e-7: 96px; --e-8: 160px;
  --margen: 16px;
  --ancho: 1320px;
  --r-pildora: 999px;
  --r-tarjeta: 14px;

  /* Movimiento (skill animate): ease-out fuerte, solo transform y opacity */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-hoja: cubic-bezier(0.32, 0.72, 0, 1);
  --d-pulsar: 140ms;
  --d-chip: 180ms;
  --d-hoja: 300ms;
  --d-revelar: 700ms;

  --brillo-azul: 0 0 0 1px rgba(255, 255, 255, .9), 0 10px 32px -8px rgba(91, 155, 255, .65);
}
@media (min-width: 768px) { :root { --margen: 24px; } }
@media (min-width: 1200px) { :root { --margen: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--tinta);
  background: var(--claro);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--azul-vivo); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; } /* evita el zoom de iPhone al escribir */
button, a, [role="button"], label.chip { touch-action: manipulation; }
button, [role="button"], .chip, .btn { user-select: none; -webkit-user-select: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--azul-vivo); outline-offset: 2px; }
.sobre-azul :focus-visible, .sobre-azul:focus-visible, .oscuro :focus-visible { outline-color: var(--azul-brillo); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: var(--margen); top: -100px; z-index: 100;
  background: var(--blanco); color: var(--tinta); padding: 12px 16px; border-radius: var(--r-pildora); font-weight: 600;
}
.saltar:focus { top: 8px; }

.contenedor { width: 100%; max-width: calc(var(--ancho) + 2 * var(--margen)); margin-inline: auto; padding-inline: var(--margen); }
.num { font-variant-numeric: tabular-nums; }

/* Pieza clara para el logo ORIGINAL (su trazo es azul oscuro: sobre negro no se lee). */
.logo-pieza { display: inline-flex; align-items: center; justify-content: center; background: var(--blanco); border-radius: 12px; flex-shrink: 0; }
.logo-pieza img { display: block; width: 100%; height: auto; }

/* ---------- Botones (píldora, una sola forma en todo el sitio) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; min-width: 44px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--r-pildora);
  font-family: var(--f-texto); font-weight: 600; font-size: 1rem; line-height: 1.1; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform var(--d-pulsar) var(--ease-out), background-color var(--d-chip) ease, border-color var(--d-chip) ease, box-shadow 240ms ease, color var(--d-chip) ease;
}
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: default; transform: none; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-principal { background: var(--azul-vivo); color: var(--blanco); }
.btn-principal:active { background: var(--azul-vivo-hondo); }
.btn-secundario { background: var(--c-secundario); color: var(--tinta); }
.btn-blanco { background: var(--blanco); color: var(--tinta); }
.btn-contorno { background: transparent; color: var(--blanco); border-color: rgba(255, 255, 255, .32); }
.btn-peligro { background: var(--rojo); color: var(--blanco); }
.btn-texto { background: transparent; color: var(--azul-vivo); padding-inline: 12px; text-decoration: underline; text-underline-offset: 3px; }
.btn-ancho { width: 100%; }
.btn-icono { padding: 0; width: 44px; min-height: 44px; height: 44px; }
.btn-grande { min-height: 56px; padding-inline: 28px; font-size: 1.0625rem; }

/* «Contáctenos»: mismo patrón que la web de EquilixOps (blanco, icono de chat en color de acento, brillo al pasar). */
.btn-contacto { background: var(--blanco); color: var(--tinta); }
.btn-contacto .icono-chat { width: 20px; height: 20px; color: var(--azul-vivo); flex: none; }
.btn-contacto:active { background: var(--azul-tenue); }
.btn-contacto:focus-visible { box-shadow: var(--brillo-azul); }
.btn-principal:focus-visible, .btn-contorno:focus-visible { box-shadow: var(--brillo-azul); }

@media (hover: hover) and (pointer: fine) {
  .btn-principal:hover { background: var(--azul-vivo-hondo); box-shadow: 0 10px 32px -10px rgba(91, 155, 255, .75); }
  .btn-secundario:hover { background: #D8E2E8; }
  .btn-blanco:hover { background: var(--azul-tenue); }
  .btn-contorno:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .6); }
  .btn-peligro:hover { background: #9E1F1F; }
  .btn-contacto:hover { background: var(--azul-tenue); box-shadow: var(--brillo-azul); }
}

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; }
.chips-envuelve { flex-wrap: wrap; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-pildora);
  background: var(--c-secundario); color: var(--tinta); font-weight: 500; font-size: .9375rem; white-space: nowrap; cursor: pointer;
  transition: background-color var(--d-chip) ease, color var(--d-chip) ease, transform var(--d-pulsar) var(--ease-out);
}
.chip::after { content: ''; position: absolute; inset: -2px 0; } /* zona táctil de 44 px */
.chip:active { transform: scale(0.96); }
.chip svg { width: 16px; height: 16px; display: none; }
.chip[aria-pressed="true"], .chip:has(input:checked) { background: var(--azul-vivo); color: var(--blanco); }
.chip[aria-pressed="true"] svg, .chip:has(input:checked) svg { display: block; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:focus-visible) { outline: 3px solid var(--azul-vivo); outline-offset: 2px; }
.chip-cuenta { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--r-pildora); background: var(--blanco); color: var(--tinta); font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip-cuenta { background: rgba(255, 255, 255, .2); color: var(--blanco); }
@media (hover: hover) and (pointer: fine) {
  .chip:not([aria-pressed="true"]):hover { background: #D8E2E8; }
}

/* ---------- Etiquetas ---------- */
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.etiqueta {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--r-pildora);
  font-size: .8125rem; font-weight: 600; white-space: nowrap;
}
.etiqueta-nuevo_ingreso { background: var(--azul-vivo); color: var(--blanco); }
.etiqueta-rebajado { background: var(--rojo); color: var(--blanco); }
.etiqueta-vendido { background: var(--negro); color: var(--blanco); }
.etiqueta-oculto { background: #E3E6E7; color: var(--tinta-suave); }
.etiqueta-dato { background: rgba(5, 11, 18, .72); color: var(--blanco); }

/* ---------- Campos ---------- */
.campo { display: grid; gap: 6px; }
.campo > label, .campo > .etiqueta-campo { font-weight: 500; font-size: var(--t-chico); color: var(--tinta); }
.entrada {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--c-borde-campo); border-radius: 10px;
  background: var(--blanco); color: var(--tinta);
  transition: border-color var(--d-chip) ease, box-shadow var(--d-chip) ease;
}
textarea.entrada { min-height: 120px; resize: vertical; line-height: 1.5; }
.entrada:focus { outline: none; border-color: var(--azul-vivo); box-shadow: 0 0 0 3px rgba(37, 99, 235, .22); }
.entrada[aria-invalid="true"] { border-color: var(--rojo); }
.ayuda { font-size: var(--t-chico); color: var(--tinta-suave); }
.error-campo { display: flex; gap: 6px; align-items: flex-start; font-size: var(--t-chico); color: var(--rojo); font-weight: 500; }
.error-campo svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }

.grupo { border: 0; padding: 0; margin: 0; min-width: 0; }
.grupo legend { padding: 0; margin-bottom: 8px; font-weight: 500; font-size: var(--t-chico); }

/* ---------- Hoja inferior y diálogo ---------- */
.velo {
  position: fixed; inset: 0; z-index: 60; background: rgba(5, 11, 18, .62);
  opacity: 0; transition: opacity var(--d-hoja) var(--ease-hoja);
}
.velo.abierto { opacity: 1; }
.hoja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 88dvh;
  display: flex; flex-direction: column; background: var(--blanco); border-radius: 20px 20px 0 0; box-shadow: var(--sombra-flota);
  transform: translateY(100%); transition: transform var(--d-hoja) var(--ease-hoja);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.hoja.abierta { transform: translateY(0); }
.hoja-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 4px 16px; }
.hoja-cabeza h2 { font-family: var(--f-texto); font-size: 1.125rem; font-weight: 600; }
.hoja-cuerpo { overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 16px; }
.hoja-pie { display: flex; gap: 8px; align-items: center; padding: 12px 16px 16px; background: var(--blanco); box-shadow: 0 -1px 0 #E3E9EC; }
@media (min-width: 768px) {
  .hoja { left: 50%; right: auto; width: min(560px, 100%); translate: -50% 0; }
}
.dialogo {
  position: fixed; left: 50%; top: 50%; z-index: 62; width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--blanco); border-radius: 20px; box-shadow: var(--sombra-flota); padding: 24px;
  transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform var(--d-hoja) var(--ease-out), opacity var(--d-hoja) var(--ease-out);
}
.dialogo.abierto { transform: translate(-50%, -50%); opacity: 1; }
.dialogo h2 { font-family: var(--f-texto); font-size: 1.375rem; font-weight: 700; margin-bottom: 8px; }
.dialogo-botones { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Aviso (toast) ---------- */
.aviso {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 20px; min-height: 48px; border-radius: var(--r-pildora);
  background: var(--negro); color: var(--blanco); box-shadow: var(--sombra-flota); font-weight: 500;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform var(--d-hoja) var(--ease-out), opacity var(--d-hoja) var(--ease-out);
}
.aviso.visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.aviso.error { background: var(--rojo); }
.aviso.exito { background: var(--verde-ok); }
.aviso button { background: transparent; border: 0; color: var(--blanco); font-weight: 600; text-decoration: underline; min-height: 44px; padding: 0 12px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .hoja, .dialogo, .aviso { transition: opacity 200ms linear; }
  .hoja { transform: none; opacity: 0; }
  .hoja.abierta { opacity: 1; }
  .dialogo, .dialogo.abierto { transform: translate(-50%, -50%); }
  .aviso, .aviso.visible { transform: translate(-50%, 0); }
  .btn:active, .chip:active { transform: none; }
}

/* Franja de «Demostración» (solo vistas previas con MODO=demo; nunca en la web real). */
.aviso-demo { margin: 0; padding: calc(6px + env(safe-area-inset-top, 0px)) var(--margen) 6px; background: var(--azul-tenue); color: var(--tinta); font-size: var(--t-chico); font-weight: 500; text-align: center; }
