/* ══════════ BARRA DE ARRIBA · TuCeroKm ══════════
   La misma en el home y en la página de cada modelo: la marca, los enlaces,
   el menú Modelos con la gama en tarjetas, el WhatsApp y la cuenta. En
   celular y tablet, la cuenta más el menú hamburguesa. El HTML lo arma
   barra.js; acá está cómo se ve.
   Arriba de todo va transparente sobre el hero oscuro, con letra blanca; al
   bajar pasa a blanca con letra oscura (clase .solida, la pone barra.js).

   Este archivo también trae la letra del sitio, Montserrat, la misma de
   byd.com/uk: un solo archivo con todos los pesos (montserrat.woff2, en la
   raíz), servido desde el hosting, sin pedirlo a Google. */

/* El sitio es claro y así se tiene que ver siempre. Con el modo oscuro del
   celular prendido, algunos navegadores (Samsung Internet, Chrome con el
   tema oscuro para los sitios) oscurecen solos las páginas que no traen
   modo oscuro propio, y quedan fondos negros, textos al revés y los colores
   de las pinturas cambiados. Esta línea les pide que no lo hagan. Va acá
   porque barra.css lo cargan el home, la página de cada modelo y la
   calculadora. */
:root { color-scheme: only light; }

@font-face {
  font-family:'Montserrat';
  src:url('montserrat.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
}

.header, .header *, .header *::before, .header *::after { box-sizing:border-box; }
.header h5, .header p { margin:0; }

.header {
  position:fixed; top:0; left:0; right:0; z-index:200;
  color:#fff; background:transparent;
  font-family:'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  transition:background-color .25s ease, box-shadow .25s ease, color .25s ease;
}
.header.solida {
  color:var(--ink, #1d1d1d);
  background:rgba(255,255,255,.94); -webkit-backdrop-filter:saturate(1.5) blur(14px); backdrop-filter:saturate(1.5) blur(14px);
  box-shadow:0 1px 0 rgba(16,24,40,.07), 0 12px 30px -24px rgba(16,24,40,.4);
}
.header-in {
  position:relative; max-width:1280px; height:84px; margin:0 auto; padding:0 40px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  transition:height .25s ease;
}
.header.solida .header-in { height:70px; }

.header .brand {
  flex-shrink:0; display:inline-flex; align-items:center; min-height:44px; line-height:1;
  color:inherit; text-decoration:none;
}
.header .brand svg { display:block; height:22px; width:auto; }

.header-links { display:flex; align-items:center; gap:34px; }
.header-links > a, .mm > button {
  font-family:inherit; font-size:15px; font-weight:500; line-height:1; white-space:nowrap;
  color:inherit; opacity:.88; text-decoration:none; padding:8px 0;
  background:none; border:none; cursor:pointer; transition:opacity .15s, color .15s;
}
.header-links > a:hover, .mm > button:hover { opacity:1; }
.header.solida .header-links > a, .header.solida .mm > button { opacity:1; color:var(--gray-7, #3f4241); }
.header.solida .header-links > a:hover, .header.solida .mm > button:hover { color:var(--ink, #1d1d1d); }
/* El enlace de la página en la que se está (por ejemplo, Calculadora) */
.header-links > a[aria-current="page"], .header.solida .header-links > a[aria-current="page"] { opacity:1; color:var(--green-dark, #00813f); font-weight:600; }
.hm-item[aria-current="page"] b { color:var(--green-dark, #00813f); }
.mm > button { display:inline-flex; align-items:center; gap:5px; }
.hb-ico { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.hb-chev { width:15px; height:15px; transition:transform .2s; }
.mm.abierto > button .hb-chev { transform:rotate(180deg); }

.header-fin { display:flex; align-items:center; gap:10px; flex-shrink:0; }
/* "Hola, Martina" al lado de Mi cuenta (el home lo escribe cuando hay sesión) */
.hb-hola { font-size:14px; font-weight:500; white-space:nowrap; margin-right:4px; }
.hb-hola[hidden] { display:none; }
.hb-hola b { font-weight:700; }
.hb-wa {
  width:44px; height:44px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center;
  color:#fff; background:rgba(255,255,255,.08); box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.3);
  transition:background .15s, color .25s, box-shadow .25s;
}
.hb-wa[hidden] { display:none; }
.hb-wa:hover { background:rgba(255,255,255,.16); }
.header.solida .hb-wa { color:var(--green-dark, #00813f); background:#fff; box-shadow:inset 0 0 0 1.5px var(--gray-3, #dfe2e0); }
.header.solida .hb-wa:hover { box-shadow:inset 0 0 0 1.5px var(--green-dark, #00813f); }
/* El botón de la derecha: blanco sobre el hero, negro cuando la barra es blanca */
.btn-cuenta {
  display:inline-flex; align-items:center; justify-content:center; height:44px; padding:0 18px;
  background:#fff; color:var(--ink, #1d1d1d); border:none; border-radius:12px; cursor:pointer; text-decoration:none;
  font-family:inherit; font-size:14px; font-weight:600; line-height:1; white-space:nowrap;
  transition:background .2s, color .2s;
}
.btn-cuenta:hover { background:#f0f1f0; }
.header.solida .btn-cuenta { background:var(--ink, #1d1d1d); color:#fff; }
.header.solida .btn-cuenta:hover { background:#000; }

.header a:focus-visible, .header button:focus-visible {
  outline:2px solid var(--green, #00A653); outline-offset:3px; border-radius:10px;
}

/* ══ Menú Modelos ══
   El panel ocupa el ancho de la barra, como la gama en el sitio de BYD:
   pestañas arriba para filtrar por tipo y una tarjeta por modelo abajo. */
.mm { position:static; }
.mm-panel {
  position:absolute; top:calc(100% + 4px); left:24px; right:24px;
  background:#fff; color:var(--ink, #1d1d1d); border-radius:22px;
  box-shadow:0 30px 80px -30px rgba(16,24,40,.45), 0 0 0 1px rgba(16,24,40,.05);
  padding:26px 30px 30px; max-height:calc(100vh - 110px); overflow:auto;
  opacity:0; visibility:hidden; transform:translateY(-8px); transition:.18s; z-index:60;
}
.mm.abierto .mm-panel { opacity:1; visibility:visible; transform:translateY(0); }
.mm-x {
  position:absolute; top:18px; right:22px; width:36px; height:36px; border-radius:50%;
  border:none; background:none; cursor:pointer; font-size:17px; color:var(--gray-5, #626664);
  display:flex; align-items:center; justify-content:center; transition:.14s;
}
.mm-x:hover { background:var(--gray-1, #f5f6f5); color:var(--ink, #1d1d1d); }
.mm-tabs { display:flex; gap:26px; flex-wrap:wrap; margin:0 44px 22px 0; }
.mm-tabs button {
  border:none; background:none; cursor:pointer; padding:0 0 7px;
  font-family:inherit; font-size:15px; font-weight:600; color:var(--gray-5, #626664);
  border-bottom:2.5px solid transparent; transition:.14s;
}
.mm-tabs button:hover { color:var(--ink, #1d1d1d); }
.mm-tabs button.sel { color:var(--ink, #1d1d1d); font-weight:700; border-bottom-color:var(--ink, #1d1d1d); }
.mm-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.mm-card {
  background:var(--gray-1, #f5f6f5); border-radius:16px; padding:18px 18px 16px;
  display:flex; flex-direction:column; transition:.15s;
}
.mm-card:hover { background:#eff1f0; }
.mm-card h5 { font-size:16px; font-weight:700; letter-spacing:-.01em; color:var(--ink, #1d1d1d); }
.mm-card p { font-size:12px; color:var(--gray-5, #626664); margin-top:3px; line-height:1.4; min-height:34px; }
.mm-card .mm-tag {
  align-self:flex-start; font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:.08em; color:#8a4b00; background:#fff4e5;
  padding:3px 9px; border-radius:20px; margin-top:8px;
}
/* La foto es la 01 de media: todas vienen en el mismo lienzo 2:1, así que
   la caja tiene esa proporción y los autos se ven del mismo porte */
.mm-foto {
  display:block; width:100%; aspect-ratio:2 / 1; max-height:150px; margin:10px 0 14px;
  background:center/contain no-repeat;
}
.mm-acc { display:flex; gap:8px; margin-top:auto; }
.mm-acc button, .mm-acc a {
  flex:1; display:inline-flex; align-items:center; justify-content:center; height:40px;
  text-align:center; text-decoration:none; cursor:pointer;
  font-family:inherit; font-size:13px; font-weight:600;
  padding:0 8px; border-radius:11px; transition:.14s; white-space:nowrap;
}
.mm-acc .mm-b1 { background:#fff; border:1.5px solid var(--gray-3, #dfe2e0); color:var(--ink, #1d1d1d); }
.mm-acc .mm-b1:hover { border-color:var(--ink, #1d1d1d); }
.mm-acc .mm-b2 { background:var(--ink, #1d1d1d); border:1.5px solid var(--ink, #1d1d1d); color:#fff; }
.mm-acc .mm-b2:hover { background:#000; }
@media (max-width:1100px) { .mm-grid { grid-template-columns:repeat(2, 1fr); } }
/* Entre 1051 y 1180 px los enlaces van un poco más juntos: así entran los cinco
   en un renglón aunque esté el "Hola, Martina" de la sesión */
@media (max-width:1180px) { .header-links { gap:22px; } }
@media (max-width:640px) {
  .mm-panel { left:10px; right:10px; padding:20px 16px 24px; }
  .mm-grid { grid-template-columns:1fr; }
  .mm-tabs { gap:18px; }
}

/* ══ Celular y tablet: la cuenta y el menú hamburguesa ══
   Los enlaces, el menú Modelos y el WhatsApp pasan al panel que abre la
   hamburguesa. */
.hamb, .hm-panel { display:none; }
.hamb {
  width:42px; height:42px; border:none; border-radius:11px; cursor:pointer; padding:0; flex-shrink:0;
  flex-direction:column; align-items:center; justify-content:center; gap:5px;
  color:#fff; background:rgba(255,255,255,.08); box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.3);
  transition:background .2s, color .25s, box-shadow .25s;
}
.header.solida .hamb { color:var(--ink, #1d1d1d); background:#fff; box-shadow:inset 0 0 0 1.5px var(--gray-3, #dfe2e0); }
.hamb i { display:block; width:18px; height:2px; border-radius:2px; background:currentColor; transition:transform .2s, opacity .2s; }
.hamb-abierto .hamb i:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.hamb-abierto .hamb i:nth-child(2) { opacity:0; }
.hamb-abierto .hamb i:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }
.hm-panel {
  position:absolute; top:calc(100% + 6px); left:10px; right:10px; z-index:60;
  background:#fff; color:var(--ink, #1d1d1d); border-radius:20px;
  box-shadow:0 30px 70px -26px rgba(16,24,40,.45), 0 0 0 1px rgba(16,24,40,.05); padding:6px 12px;
  opacity:0; visibility:hidden; transform:translateY(-8px); transition:.18s;
}
.hamb-abierto .hm-panel { opacity:1; visibility:visible; transform:translateY(0); }
.hm-item {
  display:flex; align-items:center; justify-content:space-between; width:100%; min-height:56px;
  padding:0 8px; border:none; background:none; cursor:pointer; text-decoration:none; text-align:left;
  font-family:inherit; font-size:17px; color:var(--ink, #1d1d1d);
}
.hm-item[hidden] { display:none; }
.hm-item b { font-weight:600; }
.hm-item span { font-size:22px; line-height:1; color:var(--gray-5, #626664); }
.hm-item + .hm-item { border-top:1px solid #eef0ef; }
@media (max-width:1050px) {
  .header-in { height:64px; padding:0 12px 0 18px; }
  .header.solida .header-in { height:64px; }
  /* El contenedor de los enlaces queda: adentro vive el panel de Modelos, que
     también se abre desde la hamburguesa */
  .header-links > a, .mm > button, .hb-wa, .hb-hola { display:none; }
  .header-links { gap:0; }
  .header .brand svg { height:18px; }
  .btn-cuenta { height:40px; padding:0 14px; font-size:13.5px; border-radius:11px; }
  .hamb { display:flex; }
  .hm-panel { display:block; }
  .header-fin { gap:8px; }
}

@media (prefers-reduced-motion:reduce) {
  .header, .header-in, .mm-panel, .hm-panel, .hamb i, .hb-chev { transition:none; }
}
