/* FACTORYRACING V11.81 — Navegación por pestañas flotantes sobre la unión del hero y el cuerpo de ficha.
   Sin alterar el menú BYD (#topbar), los medios del header ni el ADMIN.
   Se cargará después de los estilos de la V11.73 y prevalecerá por especificidad. */

/* Crear espacio para la barra para el texto del hero: la barra está fuera del contenedor que recorta el vídeo. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero .fr169-hero-content {
  padding-bottom:clamp(157px,18svh,210px)!important;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero .fr169-hero-signature {
  display:none!important;
}

/* Barra blanca elevada sobre la base de la imagen. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
  box-sizing:border-box!important;
  position:absolute!important;
  top:auto!important;
  right:auto!important;
  bottom:clamp(18px,3svh,30px)!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  display:grid!important;
  grid-template-columns:minmax(150px, 1fr) minmax(0,3.7fr)!important;
  gap:0!important;
  align-items:stretch!important;
  width:min(1180px, calc(100% - 48px))!important;
  max-width:1180px!important;
  min-height:88px!important;
  height:auto!important;
  margin:0!important;
  padding:9px 10px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 14px 46px rgba(3,12,25,.18),0 2px 9px rgba(3,12,25,.08)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  overflow:hidden!important;
  z-index:20!important;
}

body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-name {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  padding:12px 18px!important;
  margin:0!important;
  color:#121820!important;
  font:400 clamp(14px,1.35vw,20px)/1.35 Montserrat,'Open Sans',Arial,sans-serif!important;
  letter-spacing:.035em!important;
  text-transform:uppercase!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  text-overflow:clip!important;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links {
  box-sizing:border-box!important;
  display:grid!important;
  grid-auto-columns:minmax(0,1fr)!important;
  grid-auto-flow:column!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  min-width:0!important;
  width:100%!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  gap:0!important;
  overflow:visible!important;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a {
  box-sizing:border-box!important;
  position:relative!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  min-width:0!important;
  min-height:64px!important;
  height:100%!important;
  margin:0!important;
  padding:12px 11px!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  color:#161c24!important;
  font:400 clamp(11px,.99vw,14px)/1.4 Montserrat,'Open Sans',Arial,sans-serif!important;
  letter-spacing:.045em!important;
  text-align:center!important;
  text-decoration:none!important;
  text-transform:uppercase!important;
  white-space:normal!important;
  transition:background-color .18s ease,color .18s ease!important;
}
/* Separadores internos con márgenes superior e inferior, sin borde a toda altura. */
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a::before {
  content:"";
  position:absolute;
  top:14px;
  bottom:14px;
  left:0;
  width:1px;
  background:#d5dae0;
  pointer-events:none;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a svg {
  width:20px!important;
  height:20px!important;
  flex:0 0 20px!important;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.85;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a span {
  display:block!important;
  min-width:0;
  font-weight:400!important;
  overflow-wrap:anywhere;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a:is(:hover,:focus-visible){
  color:#b51d35!important;
  background:#f5f6f8!important;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a:focus-visible {
  outline:2px solid #b51d35!important;
  outline-offset:-3px!important;
}
/* Ya no existe un botón de solicitud dentro de las cuatro pestañas. */
body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-nav-cta{display:none!important}

/* El logo de la marca también aparece en el capítulo 01; tamaño elegante, sin deformar. */
body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:20px;
  margin:0 0 27px;
}
body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandline .fr169-kicker {
  margin:0!important;
}
body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandmark {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  box-sizing:border-box;
  width:clamp(135px,16vw,210px);
  height:91px;
  padding:12px 18px;
  border:1px solid #e9ecef;
  border-radius:14px;
  background:#f4f5f6;
}
body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandmark img {
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  filter:none!important;
  opacity:1!important;
}
/* Intermedio: tamaño mínimo y mejor aprovechamiento de anchura. */
@media(max-width:1030px) {
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
    grid-template-columns:minmax(125px,.9fr) minmax(0,4fr)!important;
    width:calc(100% - 38px)!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-name {font-size:14px!important;padding:9px 8px!important}
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a {flex-direction:column!important;gap:7px!important;font-size:11px!important;letter-spacing:.015em!important}
}
@media(max-width:700px){
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero .fr169-hero-content {
    padding-bottom:clamp(163px,21svh,200px)!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:0!important;
    bottom:12px!important;
    width:calc(100% - 24px)!important;
    min-height:0!important;
    padding:6px 7px 7px!important;
    border-radius:18px!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-name {
    display:block!important;
    padding:7px 8px 9px!important;
    font:400 clamp(12px,3.5vw,16px)/1.25 Montserrat,Arial,sans-serif!important;
    letter-spacing:.055em!important;
    text-align:center!important;
    border-bottom:1px solid #e3e6ea;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links {
    display:grid!important;
    grid-auto-flow:column!important;
    grid-auto-columns:minmax(0,1fr)!important;
    gap:0!important;
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a {
    display:flex!important;
    flex-direction:column!important;
    gap:5px!important;
    min-height:69px!important;
    padding:10px 3px 6px!important;
    font:400 clamp(8px,2.25vw,10px)/1.23 Montserrat,Arial,sans-serif!important;
    letter-spacing:0!important;
    overflow-wrap:anywhere!important;
    text-wrap:balance;
    word-break:normal;
  }
  /* El rótulo más largo debe caber de una pieza sin una letra huérfana. */
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a[href="#ficha-tecnica"] span {
    font-size:clamp(7px,1.95vw,9px)!important;
    letter-spacing:-.025em!important;
    white-space:nowrap!important;
    overflow-wrap:normal!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a:first-child::before {display:none}
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a::before {top:12px;bottom:9px}
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a svg {width:19px!important;height:19px!important;flex-basis:19px!important}
  body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandmark {width:145px;height:76px;padding:10px 13px}
}
@media(max-width:370px) {
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a {font-size:8px!important;padding:9px 2px 5px!important}
  body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandline{gap:13px}
}
@media(prefers-reduced-motion:reduce) {
  body[data-fr169-ficha="1"] .fr169-detail > .fr177-tabs .fr169-section-links a {transition:none!important}
}

/* V11.78 — 50/50 sobre la frontera: la navegación vive FUERA del hero.
   El hero conserva overflow:hidden para recortar correctamente vídeos YouTube de fondo. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero {
  overflow:hidden!important;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero .fr169-hero-content {
  padding-bottom:clamp(75px,10svh,128px)!important;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
  --fr178-tabs-overlap:44px;
  position:relative!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  transform:none!important;
  z-index:22!important;
  min-height:88px!important;
  height:88px!important;
  margin:calc(-1 * var(--fr178-tabs-overlap)) auto calc(-1 * var(--fr178-tabs-overlap))!important;
  isolation:isolate;
  overflow:hidden!important;
}
/* El blanco del cuerpo debe comenzar justo al pie del vídeo. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-body {
  position:relative;
  z-index:0;
}
/* El fabricante aparece el DOBLE de grande, sin recuadro ni fondo gris. */
body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandmark {
  width:clamp(270px,32vw,420px)!important;
  height:182px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandmark img {
  object-fit:contain!important;
  object-position:left center!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  mix-blend-mode:normal!important;
}
@media(max-width:700px){
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
    --fr178-tabs-overlap:62px;
    min-height:124px!important;
    height:auto!important;
    margin:calc(-1 * var(--fr178-tabs-overlap)) auto calc(-1 * var(--fr178-tabs-overlap))!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero .fr169-hero-content {
    padding-bottom:clamp(78px,11svh,125px)!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail .fr169-story {
    padding-top:clamp(106px,13vw,136px)!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail .fr169-story .fr177-story-brandmark {
    width:min(290px,100%)!important;
    height:152px!important;
  }
}

/* V11.79 · La ruta Inicio / Motocicletas va DEBAJO de la descripción breve
   del modelo (o del título, cuando no haya subtítulo) dentro del hero. */
body[data-fr169-ficha="1"] .fr169-detail .fr169-hero .fr169-breadcrumb {
  position:relative!important;
  inset:auto!important;
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:10px!important;
  margin:clamp(13px,1.8vw,20px) 0 0!important;
  padding:0!important;
  font-size:clamp(11px,.85vw,13px)!important;
  font-weight:500!important;
  line-height:1.5!important;
  letter-spacing:.03em!important;
  color:#fff!important;
}
body[data-fr169-ficha="1"] .fr169-detail .fr169-hero .fr169-breadcrumb a {
  color:#fff!important;
  font-weight:500!important;
  text-decoration:none!important;
  border-bottom:1px solid rgba(255,255,255,.45)!important;
}
body[data-fr169-ficha="1"] .fr169-detail .fr169-hero .fr169-breadcrumb a:hover,
body[data-fr169-ficha="1"] .fr169-detail .fr169-hero .fr169-breadcrumb a:focus-visible {
  border-bottom-color:#fff!important;
}
@media(max-width:700px){
  body[data-fr169-ficha="1"] .fr169-detail .fr169-hero .fr169-breadcrumb {
    gap:8px!important;
    margin-top:12px!important;
    font-size:11px!important;
  }
}

/* V11.80 — La MITAD INFERIOR de las pestañas se funde visualmente con el
   cuerpo de la ficha. Conservamos el 50/50 físico (márgenes negativos de
   V11.78), los iconos y los separadores, pero ya no hay una tarjeta flotante
   con borde y sombra inferior. Solo las esquinas SUPERIORES son redondeadas.
   Así el blanco de la barra continúa sin interrupciones hacia el contenido. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
  background-color:#fff!important;
  border:0!important;
  border-bottom:0!important;
  border-radius:22px 22px 0 0!important;
  box-shadow:0 -8px 22px -16px rgba(4,12,24,.55)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
body[data-fr169-ficha="1"] .fr169-detail > .fr169-body,
body[data-fr169-ficha="1"] .fr169-detail > .fr169-body > .fr169-story {
  background:#fff!important;
}
@media (max-width:700px){
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
    border-radius:18px 18px 0 0!important;
  }
}

/* V11.81 — Corregir el recorte de la barra de pestañas EN EL PRIMER PANTALLAZO.
   La altura 100svh de la ficha situaba el centro de las pestañas exactamente
   al pie de la ventana: quedaba visible solo la mitad superior. Reservamos
   un área de seguridad dentro del viewport sin mover las pestañas de la
   frontera real entre foto y fondo blanco. El contenido multimedia continúa
   cubriendo al 100% el hero, sin barras ni deformación.
   Las reglas son EXCLUSIVAS de fichas; no afectan al menú BYD ni al index. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero {
  box-sizing:border-box!important;
  height:calc(100svh - clamp(125px, 17svh, 165px))!important;
  min-height:0!important;
  max-height:none!important;
}
/* Asegurar que el contenido del hero quede bien separado de las pestañas
   aunque se reduzca la altura para verlas enteras desde el primer momento. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
  padding-bottom:clamp(58px, 8svh, 85px)!important;
}
/* Título hero 25% menor: antes máx. 64px; ahora máx. 48px.
   Se mantienen el peso, la familia y el color que ya tenía. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content h1 {
  font-size:clamp(27px, 3vw, 48px)!important;
  line-height:1.08!important;
  max-width:900px!important;
}
/* Conservar las pestañas en la frontera hero/cuerpo: el solape sigue siendo
   exactamente mitad sobre vídeo/foto y mitad sobre el fondo blanco. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
  visibility:visible!important;
  opacity:1!important;
}
@media (max-width:700px) {
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero {
    height:calc(100svh - clamp(125px, 17svh, 165px))!important;
    min-height:0!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
    padding-bottom:clamp(66px, 9svh, 84px)!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content h1 {
    font-size:clamp(27px, 7.8vw, 44px)!important;
  }
}
/* En móviles cortos: compactar SOLO el bloque del hero, nunca las pestañas.
   Evita que el logo y título queden ocultos bajo la navegación superior. */
@media (max-width:700px) and (max-height:700px) {
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
    padding-bottom:clamp(55px, 8svh, 70px)!important;
  }
  body[data-fr169-ficha="1"] .fr169-hero .fr-detail-brand {
    max-height:62px!important;
    max-width:min(150px, 43vw)!important;
    margin-bottom:5px!important;
  }
  body[data-fr169-ficha="1"] .fr169-hero .fr169-eyebrow {
    font-size:9px!important;
    line-height:1.35!important;
    letter-spacing:.1em!important;
    margin:4px 0 6px!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content h1 {
    font-size:clamp(24px, 7.3vw, 35px)!important;
    line-height:1.06!important;
    margin:6px 0!important;
  }
  body[data-fr169-ficha="1"] .fr169-hero .fr169-hero-lead {
    margin-top:8px!important;
    font-size:12px!important;
    line-height:1.4!important;
    -webkit-line-clamp:2!important;
  }
  body[data-fr169-ficha="1"] .fr169-hero .fr169-breadcrumb {
    margin-top:6px!important;
    font-size:10px!important;
  }
  body[data-fr169-ficha="1"] .fr169-hero .fr169-hero-buttons {
    flex-wrap:nowrap!important;
    gap:6px!important;
    margin-top:11px!important;
  }
  body[data-fr169-ficha="1"] .fr169-hero .fr169-hero-buttons .fr-detail-cta {
    min-width:0!important;
    min-height:36px!important;
    padding:8px 9px!important;
    font-size:9px!important;
    gap:5px!important;
    white-space:nowrap!important;
  }
}
/* Ventanas panorámicas poco altas, como un navegador con muchas barras:
   mantener libres los enlaces incluso cuando la altura útil es reducida. */
@media (max-height:650px) {
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
    padding-bottom:clamp(56px, 9svh, 72px)!important;
  }
}

/* V11.82 — HERO VERDADERAMENTE A PANTALLA COMPLETA Y BLOQUE SUPERIOR
   ligeramente elevado. No reducimos la altura del vídeo / foto para hacer
   sitio a la subnavegación. En cambio, la pestaña blanca se superpone en
   el pie del hero, y el cuerpo blanco asciende detrás de su mitad inferior.
   El elemento multimedia conserva siempre el 100 % del hero (100svh). */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero {
  height:100svh!important;
  min-height:100svh!important;
  max-height:none!important;
  position:relative!important;
}
/* Al recuperar los ~125-165px de hero de la V11.81, compensamos en el
   espaciado del bloque para que logo, título, descripción y CTA suban solo
   18px respecto a su posición previa. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
  padding-bottom:calc(clamp(58px,8svh,85px) + clamp(125px,17svh,165px) + 18px)!important;
}
/* Pestañas íntegras dentro del primer pantallazo.
   Desktop: alto 88px; 14px de respiro por debajo de la barra.
   El cuerpo arranca a la altura del centro vertical de las pestañas. */
body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
  --fr182-breathing:14px;
  --fr182-tabs-height:88px;
  height:var(--fr182-tabs-height)!important;
  min-height:var(--fr182-tabs-height)!important;
  margin:calc(-1 * (var(--fr182-tabs-height) + var(--fr182-breathing))) auto calc(-1 * var(--fr182-tabs-height) / 2)!important;
  z-index:22!important;
}
/* En pantallas táctiles, mantener las cuatro pestañas y su nombre
   sin recortes y sin prolongar el contenido por debajo del viewport. */
@media(max-width:700px){
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero {
    height:100svh!important;
    min-height:100svh!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
    padding-bottom:calc(clamp(66px,9svh,84px) + clamp(125px,17svh,165px) + 14px)!important;
  }
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-section-nav.fr177-tabs {
    --fr182-tabs-height:124px;
    --fr182-breathing:14px;
    height:var(--fr182-tabs-height)!important;
    min-height:var(--fr182-tabs-height)!important;
  }
}
@media(max-width:700px) and (max-height:700px){
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
    padding-bottom:calc(clamp(55px,8svh,70px) + clamp(125px,17svh,165px) + 10px)!important;
  }
}
@media(min-width:701px) and (max-height:650px){
  body[data-fr169-ficha="1"] .fr169-detail > .fr169-hero.fr-detail-hero .fr169-hero-content {
    padding-bottom:calc(clamp(56px,9svh,72px) + clamp(125px,17svh,165px) + 14px)!important;
  }
}
