/* ==========================================================
   DOCTORE BIKE — estilos base + navbar
   ========================================================== */

:root {
  --red: #c61b18;
  --red-deep: #773231;
  --red-grad: linear-gradient(115deg, var(--red) 0%, var(--red-deep) 100%);
  --flag: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22currentColor%22%3E%3Cpath d=%22M227.32,48.75A8,8,0,0,0,218.76,50c-28,24.22-51.72,12.48-79.21-1.13C111.07,34.76,78.78,18.79,42.76,50h0A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,227.32,48.75ZM56,160.44V109.88c16.85-11.28,32.64-11.59,48-7.34v51.74C88.87,150.47,72.87,150.71,56,160.44ZM104,50.87c9.25,2.83,18.61,7.45,28.45,12.32,11.26,5.57,23.11,11.43,35.55,14.56v51.74c15.35,4.25,31.14,3.94,48-7.35v50.11c-16.87,13.32-32.27,13.72-48,8.91V129.49c-21.62-6-42.38-21-64-26.95Z%22/%3E%3C/svg%3E");
  --black: #0a0a0a;
  --ink: #141414;
  --steel: #1e1e1e;
  --line: rgba(255, 255, 255, .1);
  --white: #fff;
  --muted: #9a9a9a;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --topbar-h: 36px;
  --nav-h: 84px;
  --skew: -12deg;
  --ease: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ---------- Utilidades ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--red);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 1.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  isolation: isolate;
  white-space: nowrap;
}
/* <button> sin el estilo nativo del navegador */
button.btn {
  color: var(--white);
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

/* Botón inclinado tipo "race" con barrido blanco al hover */
.btn--race::before,
.btn--race::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: skewX(var(--skew));
  z-index: -1;
}
.btn--race::before { background: var(--red-grad); }
.btn--race::after {
  background: var(--white);
  transform: skewX(var(--skew)) scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.btn--race { transition: color .45s var(--ease); }
.btn--race:hover { color: var(--black); }
.btn--race:hover::after { transform: skewX(var(--skew)) scaleX(1); transform-origin: left; }

.btn--ghost {
  height: 40px;
  padding: 0 1.2rem;
  border: 1px solid var(--line);
  transition: border-color .3s, background .3s;
}
.btn--ghost:hover { border-color: var(--red); background: var(--red-grad); }

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
}

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-deep) 100%);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  overflow: hidden;
}

.topbar__ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}
.ticker__track span {
  padding: 0 .9rem;
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
/* Bandera de cuadros (Phosphor Icons, flag-checkered fill) delante de cada carrera */
.ticker__track span::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: -1.2rem; /* compensa el gap del span */
  background: var(--black);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22currentColor%22%3E%3Cpath d=%22M227.32,48.75A8,8,0,0,0,218.76,50c-28,24.22-51.72,12.48-79.21-1.13C111.07,34.76,78.78,18.79,42.76,50h0A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,227.32,48.75ZM56,160.44V109.88c16.85-11.28,32.64-11.59,48-7.34v51.74C88.87,150.47,72.87,150.71,56,160.44ZM104,50.87c9.25,2.83,18.61,7.45,28.45,12.32,11.26,5.57,23.11,11.43,35.55,14.56v51.74c15.35,4.25,31.14,3.94,48-7.35v50.11c-16.87,13.32-32.27,13.72-48,8.91V129.49c-21.62-6-42.38-21-64-26.95Z%22/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22currentColor%22%3E%3Cpath d=%22M227.32,48.75A8,8,0,0,0,218.76,50c-28,24.22-51.72,12.48-79.21-1.13C111.07,34.76,78.78,18.79,42.76,50h0A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,227.32,48.75ZM56,160.44V109.88c16.85-11.28,32.64-11.59,48-7.34v51.74C88.87,150.47,72.87,150.71,56,160.44ZM104,50.87c9.25,2.83,18.61,7.45,28.45,12.32,11.26,5.57,23.11,11.43,35.55,14.56v51.74c15.35,4.25,31.14,3.94,48-7.35v50.11c-16.87,13.32-32.27,13.72-48,8.91V129.49c-21.62-6-42.38-21-64-26.95Z%22/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}
/* Separador: barra inclinada "/" como en el hero */
.ticker__track span::after {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--black);
  transform: skewX(-20deg);
}
.topbar:hover .ticker__track { animation-play-state: paused; }

@keyframes ticker {
  to { transform: translateX(-50%); }
}

.topbar__info {
  display: flex;
  height: 100%;
  background: var(--black);
  position: relative;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 0 1rem;
}
/* Corte diagonal entre el rojo y el negro */
.topbar__info::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -18px;
  width: 36px;
  background: var(--black);
  transform: skewX(var(--skew));
}
.topbar__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1rem;
  color: #d8d8d8;
  transition: color .2s;
}
.topbar__link:hover { color: var(--red); }
.topbar__link svg { width: 14px; height: 14px; fill: currentColor; }
.topbar__link svg.ig {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.topbar__link svg.ig .dot { fill: currentColor; stroke: none; }

/* ---------- Navbar ---------- */
.navbar {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: linear-gradient(180deg, rgba(10, 10, 10, .85), rgba(10, 10, 10, 0));
  transition: background .3s, height .3s;
}

/* Al hacer scroll: navbar sólida y más compacta (CSS scroll-driven, sin JS) */
@supports (animation-timeline: scroll()) {
  .navbar {
    animation: nav-solid linear both;
    animation-timeline: scroll(root);
    animation-range: 0 220px;
  }
  @keyframes nav-solid {
    to {
      height: 68px;
      background: rgba(10, 10, 10, .92);
      backdrop-filter: blur(14px);
      box-shadow: 0 1px 0 var(--line);
    }
  }
}

.navbar__logo {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 12px 0;
  flex-shrink: 0;
}
.navbar__logo img {
  height: 100%;
  width: auto;
  transition: transform .3s var(--ease);
}
.navbar__logo:hover img { transform: skewX(var(--skew)) translateX(4px); }

/* ---------- Menú escritorio ---------- */
.menu {
  display: flex;
  align-items: stretch;
  height: 100%;
  margin-inline: auto;
}

.menu__item { display: flex; align-items: center; }

.menu__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  height: 100%;
  padding: 0 1.05rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #e6e6e6;
  transition: color .25s;
}

/* Barra roja inclinada que "acelera" de izquierda a derecha */
.menu__link::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  right: 1.05rem;
  bottom: 22%;
  height: 3px;
  background: var(--red-grad);
  transform: skewX(var(--skew)) scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.menu__item:hover > .menu__link,
.menu__item:focus-within > .menu__link { color: var(--white); }
.menu__item:hover > .menu__link::after,
.menu__item:focus-within > .menu__link::after {
  transform: skewX(var(--skew)) scaleX(1);
  transform-origin: left;
}

.caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .3s var(--ease);
}
.menu__item:hover .caret,
.menu__item:focus-within .caret { transform: translateY(1px) rotate(225deg); }

/* ---------- Dropdown simple ---------- */
.has-drop { position: relative; }

.drop {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  padding: .6rem 0;
  background: var(--ink);
  border-top: 3px solid var(--red);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  visibility: hidden;
  transition: clip-path .45s var(--ease), opacity .3s, visibility .45s;
}
.has-drop:hover .drop,
.has-drop:focus-within .drop {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  visibility: visible;
}

.drop a {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #bdbdbd;
  transition: color .25s, padding-left .35s var(--ease), background .25s;
}
.drop a::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  width: 10px;
  height: 3px;
  background: var(--red);
  transform: skewX(var(--skew)) scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.drop a:hover {
  color: var(--white);
  padding-left: 2.6rem;
  background: rgba(255, 255, 255, .03);
}
.drop a:hover::before { transform: skewX(var(--skew)) scaleX(1); }
/* Título de grupo dentro del desplegable (Tienda: Bicis / Accesorios) */
.drop__group {
  padding: .9rem 1.5rem .3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--red);
}
.drop__group:not(:first-child) { margin-top: .4rem; border-top: 1px solid var(--line); }

.tag {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  padding: .15rem .45rem;
  background: var(--red-grad);
  color: var(--white);
  transform: skewX(var(--skew));
}

/* ---------- Mega menú (Carreras) ---------- */
.has-mega { position: static; }

.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  gap: 1.25rem;
  padding: 2.25rem clamp(1rem, 3vw, 2.5rem);
  background: var(--ink);
  border-top: 3px solid var(--red);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  visibility: hidden;
  transition: clip-path .55s var(--ease), opacity .3s, visibility .55s;
}
.has-mega:hover .mega,
.has-mega:focus-within .mega {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  visibility: visible;
}

.mega__intro h3 {
  margin: .5rem 0 .8rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: .9;
  text-transform: uppercase;
}
.mega__intro em {
  font-style: italic;
  background: var(--red-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em; /* evita cortar la cursiva */
}
.mega__intro p {
  max-width: 28ch;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}

.mega__card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--black);
}
.mega__card-bg {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-58deg, transparent 0 22px, rgba(255, 255, 255, .03) 22px 24px),
    linear-gradient(135deg, var(--steel), var(--black));
}
/* Cuando haya fotos: <img> dentro de .mega__card */
.mega__card img,
.mega__card-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.6) brightness(.7);
  transform: scale(1.04);
  transition: transform .8s var(--ease), filter .5s;
}
.mega__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent 60%);
}
.mega__card-title {
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.mega__card-title::before {
  content: "";
  display: block;
  width: 28px;
  height: 4px;
  margin-bottom: .5rem;
  background: var(--red);
  transform: skewX(var(--skew));
  transition: width .5s var(--ease);
}
.mega__card:hover img,
.mega__card:hover .mega__card-bg { transform: scale(1.12); filter: none; }
.mega__card:hover .mega__card-title::before { width: 60px; }

/* ---------- Acciones derecha ---------- */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #e6e6e6;
  transition: color .25s;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover { color: var(--red); }

.badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  background: var(--red-grad);
  color: var(--white);
  border-radius: 50%;
}

.navbar__actions .btn--race { margin-left: 1rem; }

/* ---------- Hamburguesa ---------- */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  place-items: center;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  transform: skewX(var(--skew));
  transition: width .3s var(--ease);
}
.burger span { position: relative; }
.burger span::before,
.burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -8px; width: 18px; background: var(--red); }
.burger span::after { top: 8px; width: 22px; }
.burger:hover span::before,
.burger:hover span::after { width: 26px; }

/* ---------- Drawer móvil ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 5rem 1.5rem 2rem;
  overflow-y: auto;
  background:
    linear-gradient(115deg, transparent 70%, rgba(198, 27, 24, .16) 70%, rgba(119, 50, 49, .08) 100%),
    var(--black);
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  visibility: hidden;
  transition: clip-path .6s var(--ease), visibility .6s;
}
.nav-toggle:checked ~ .drawer {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  visibility: visible;
}

.drawer__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--white);
  background: var(--red-grad);
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}

.drawer__nav summary,
.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 2rem;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.drawer__nav summary::-webkit-details-marker { display: none; }
.drawer__nav summary::after {
  content: "+";
  color: var(--red);
  font-style: normal;
  transition: transform .3s var(--ease);
}
.drawer__nav details[open] summary::after { transform: rotate(45deg); }
.drawer__nav details[open] summary { color: var(--red); }

.drawer__nav details a {
  display: block;
  padding: .55rem 0 .55rem 1rem;
  border-left: 2px solid var(--red);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #bdbdbd;
}
.drawer__nav details a:first-of-type { margin-top: .8rem; }
.drawer__nav details a:last-of-type { margin-bottom: 1rem; }
.drawer__nav details a:hover { color: var(--white); }

.drawer__cta { margin-top: 2rem; align-self: flex-start; flex-shrink: 0; }
.drawer__phone {
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
}

/* Evita scroll del body con el drawer abierto */
body:has(.nav-toggle:checked) { overflow: hidden; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1280px) {
  .menu__link { padding: 0 .75rem; font-size: .98rem; }
  .menu__link::after { left: .75rem; right: .75rem; }
  .navbar { gap: 1rem; }
}

@media (max-width: 1100px) {
  .menu,
  .navbar__actions .btn--race { display: none; }
  .burger { display: grid; }
  .navbar__actions { margin-left: auto; }
}

@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  .topbar__info .topbar__link:last-child { display: none; }
}

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

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(1rem, 3vw, 2.5rem) clamp(3rem, 10vh, 7rem);
  overflow: hidden;
  background:
    linear-gradient(115deg, transparent 70%, rgba(198, 27, 24, .3) 70%, rgba(119, 50, 49, .12) 100%),
    repeating-linear-gradient(-58deg, transparent 0 40px, rgba(255, 255, 255, .025) 40px 42px),
    var(--black);
}

/* Foto vertical anclada a la derecha, fundida con el negro por la izquierda y abajo */
.hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  /* Caja vertical, cercana a la proporción de la foto: menos recorte = menos zoom */
  aspect-ratio: 9 / 10;
  max-width: 68%;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 5%, rgba(0, 0, 0, .8) 12%, #000 22%),
    linear-gradient(0deg, transparent 0%, #000 10%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .45) 5%, rgba(0, 0, 0, .8) 12%, #000 22%),
    linear-gradient(0deg, transparent 0%, #000 10%);
  mask-composite: intersect;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  filter: grayscale(1) contrast(1.15) brightness(.92);
  animation: hero-fade 1.2s ease-out both;
}
/* Tinte oscuro superior para que la navbar se lea sobre la pared clara */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, .7) 0%, transparent 22%);
}
/* Panel rojo en diagonal: intenso bajo la foto (fondo) y muy suave por encima */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 70%, rgba(198, 27, 24, .14) 70%, rgba(119, 50, 49, .08) 100%);
  pointer-events: none;
  z-index: 1;
}

@keyframes hero-fade {
  from { opacity: 0; }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.4rem;
}
/* Separador inclinado entre marca y eyebrow */
.hero__meta .eyebrow {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.hero__meta .eyebrow::before {
  content: "";
  width: 5px;
  height: 24px;
  background: var(--red);
  transform: skewX(-20deg);
}
.hero__brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.6rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
}
.hero__brand small {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: #bdbdbd;
}
.hero h1 {
  margin-top: .6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.6rem, 10vw, 9.5rem);
  line-height: .82;
  text-transform: uppercase;
}
.hero h1 em {
  background: var(--red-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em; /* evita cortar la cursiva */
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  margin-top: 2.4rem;
}
.hero__ctas .btn--ghost { height: 44px; }

@media (max-width: 800px) {
  .hero__media {
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    bottom: 30%;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 45%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 45%);
  }
  .hero__meta .eyebrow::before { display: none; }
}

/* ==========================================================
   CARRERAS
   ========================================================== */
.section-title {
  margin-top: .6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: .85;
  text-transform: uppercase;
}
.section-title em {
  background: var(--red-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em; /* evita cortar la cursiva */
}

.races {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 6rem);
  background: var(--black);
  overflow: hidden;
}
/* Número gigante de fondo */
.races::before {
  content: "2026";
  position: absolute;
  top: 1rem;
  right: -2rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(10rem, 26vw, 24rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .06);
  pointer-events: none;
}

.races__head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.races__intro { max-width: 420px; }
.races__intro p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.races__services {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.2rem;
}
.races__services li {
  padding: .35rem .8rem;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #d0d0d0;
}

/* ---------- Carril horizontal (scroll-snap, sin JS) ---------- */
.races__rail {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--steel);
}
.races__rail::-webkit-scrollbar { height: 4px; }
.races__rail::-webkit-scrollbar-track { background: var(--steel); }
.races__rail::-webkit-scrollbar-thumb { background: var(--red); }

.races__list {
  display: flex;
  gap: 1rem;
  width: max-content;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  list-style: none;
  counter-reset: race;
}
.races__list > li {
  scroll-snap-align: start;
  counter-increment: race;
}

.race {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: clamp(250px, 24vw, 320px);
  aspect-ratio: 3 / 4;
  padding: 1.5rem;
  overflow: hidden;
  isolation: isolate;
  background:
    repeating-linear-gradient(-58deg, transparent 0 22px, rgba(255, 255, 255, .025) 22px 24px),
    linear-gradient(160deg, var(--steel), var(--ink) 70%);
  border: 1px solid var(--line);
  transition: border-color .4s;
}
/* Barrido rojo desde abajo al hover */
.race::before {
  content: "";
  position: absolute;
  inset: -10% -20%;
  z-index: -1;
  background: var(--red-grad);
  transform: translateY(105%) skewY(-8deg);
  transition: transform .6s var(--ease);
}
/* Número de orden de la carrera */
.race::after {
  content: counter(race, decimal-leading-zero);
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .15em;
  color: var(--muted);
  transition: color .4s;
}
.race:hover { border-color: var(--red); }
.race:hover::before { transform: translateY(0) skewY(-8deg); }
.race:hover::after { color: var(--white); }

.race__date {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red);
  transition: color .4s;
}
.race__date b {
  font-weight: 800;
  font-style: italic;
  font-size: 6rem;
  line-height: .85;
  letter-spacing: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .5);
  transition: color .4s, -webkit-text-stroke-color .4s;
}
.race:hover .race__date { color: var(--white); }
.race:hover .race__date b { color: var(--white); -webkit-text-stroke-color: var(--white); }

.race__range {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .4s;
}
.race:hover .race__range { color: rgba(255, 255, 255, .85); }

.race__name {
  margin: .4rem 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 2rem;
  line-height: .95;
  text-transform: uppercase;
}

.race__more {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.race__more i {
  position: relative;
  width: 22px;
  height: 2px;
  background: var(--red);
  transition: width .4s var(--ease), background .4s;
}
.race__more i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--red);
  border-right: 2px solid var(--red);
  transform: rotate(45deg);
  transition: border-color .4s;
}
.race:hover .race__more i { width: 40px; background: var(--white); }
.race:hover .race__more i::after { border-color: var(--white); }

/* Cuando haya foto: <img class="race__img"> dentro de .race */
.race__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.5) brightness(.45);
  transition: transform .8s var(--ease), filter .5s;
  /* Se funde con el fondo oscuro arriba (fecha) y abajo (nombre) */
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .5) 22%, #000 42%, #000 50%, rgba(0, 0, 0, .25) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .5) 22%, #000 42%, #000 50%, rgba(0, 0, 0, .25) 100%);
}
/* Con foto: el barrido rojo es translúcido y la foto se aviva */
.race:has(.race__img)::before { opacity: .72; }
.race:has(.race__img) .race__date { text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }
.race:hover .race__img {
  transform: scale(1.06);
  filter: grayscale(.2) brightness(.6);
}

.races__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 0;
}
.races__hint {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.races__hint i {
  width: 40px;
  height: 2px;
  background: var(--red);
  animation: hint 1.8s var(--ease) infinite;
  transform-origin: left;
}
@keyframes hint {
  0%   { transform: scaleX(.2); }
  60%  { transform: scaleX(1); }
  100% { transform: scaleX(.2); }
}

/* ==========================================================
   MONTAJES
   ========================================================== */
.build {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 8rem);
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 3vw, 2.5rem);
  background: var(--black);
  overflow-x: clip; /* la banda roja no genera scroll horizontal en móvil */
}

.build__media {
  position: relative;
  aspect-ratio: 1 / 1;
}
.build__frame {
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
}
/* Franja roja en diagonal como en el hero: más intensa por detrás de la foto
   (se ve donde sobresale) y muy suave por encima */
.build__media::before,
.build__media::after {
  content: "";
  position: absolute;
  inset: -8% -6% -8% 0;
  /* Banda inclinada tipo "/" que sobresale arriba, abajo y a la derecha */
  clip-path: polygon(78% 0, 100% 0, 66% 100%, 44% 100%);
  pointer-events: none;
}
.build__media::before {
  background: linear-gradient(180deg, rgba(198, 27, 24, .3), rgba(119, 50, 49, .12));
}
.build__media::after {
  z-index: 2;
  background: linear-gradient(180deg, rgba(198, 27, 24, .14), rgba(119, 50, 49, .08));
}
.build__frame { position: relative; z-index: 1; }
/* Viñeta: los extremos de la foto se funden hacia negro */
.build__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, .65) 0%, transparent 14%, transparent 86%, rgba(10, 10, 10, .65) 100%),
    linear-gradient(180deg, rgba(10, 10, 10, .65) 0%, transparent 14%, transparent 86%, rgba(10, 10, 10, .65) 100%),
    radial-gradient(ellipse 72% 72% at 55% 50%, transparent 38%, rgba(10, 10, 10, .7) 78%, var(--black) 96%);
  pointer-events: none;
}
.build__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 60%;
  filter: grayscale(.3) brightness(.85) contrast(1.05);
  transition: transform 1.2s var(--ease), filter .6s;
}
.build__media:hover img { transform: scale(1.04); filter: none; }

/* Texto arriba, pasos alineados con el pie de la foto */
.build__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  max-width: 640px;
}

.build__lead {
  margin: 1.6rem 0 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .3s;
}
.link-arrow i {
  position: relative;
  width: 28px;
  height: 2px;
  background: var(--red);
  transition: width .4s var(--ease);
}
.link-arrow i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--red);
  border-right: 2px solid var(--red);
  transform: rotate(45deg);
}
.link-arrow:hover { color: var(--red); }
.link-arrow:hover i { width: 48px; }

.build__steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
}
.build__steps li {
  position: relative;
  counter-increment: step;
  padding-top: 1.4rem;
}
/* Línea superior: gris, con barra roja inclinada que "acelera" al hover */
.build__steps li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background:
    linear-gradient(90deg, var(--red), var(--red-deep)) 0 0 / var(--fill) 100% no-repeat,
    var(--line);
  transform: skewX(var(--skew));
  transition: background-size .5s var(--ease);
}
/* Progreso: el paso 1 llena 1/3, el 2 llena 2/3 y el 3 la barra entera */
.build__steps li:nth-child(1) { --fill: 33.333%; }
.build__steps li:nth-child(2) { --fill: 66.666%; }
.build__steps li:nth-child(3) { --fill: 100%; }
.build__steps li:hover::after { background-size: 100% 100%, auto; }

/* Número grande en contorno, como las fechas de las carreras */
.build__steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: .5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 3.6rem;
  line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .35);
  transition: color .4s, -webkit-text-stroke-color .4s;
}
.build__steps li:hover::before {
  color: var(--red);
  -webkit-text-stroke-color: var(--red);
}

.build__steps h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.build__steps p {
  margin-top: .35rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .build { grid-template-columns: 1fr; }
  .build__steps { grid-template-columns: 1fr; }
}

/* ==========================================================
   SERVICIOS EN CARRERA
   ========================================================== */
.services {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 3vw, 2.5rem);
  background: var(--black);
  overflow: hidden;
  isolation: isolate;
}
/* Contenido centrado y más estrecho que la pantalla */
.services > * {
  max-width: 1200px;
  margin-inline: auto;
}
/* Bandera de cuadros gigante y muy sutil de fondo */
.services::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 1400px;
  height: 900px;
  right: -300px;
  bottom: -260px;
  background: repeating-conic-gradient(rgba(255, 255, 255, .045) 0 25%, transparent 0 50%) 0 0 / 120px 120px;
  transform: perspective(900px) rotateY(-28deg) rotateZ(-14deg) skewX(-8deg);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 55% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 55% 50%, #000 30%, transparent 75%);
  pointer-events: none;
}

.services__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.services__intro {
  max-width: 420px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* ---------- Lista: una fila por servicio ---------- */
.services__list {
  list-style: none;
  counter-reset: service;
  border-top: 2px solid var(--white);
}
.services__list > li {
  counter-increment: service;
  border-bottom: 1px solid var(--line);
}

.service {
  position: relative;
  cursor: pointer;
  outline: none;
  display: grid;
  grid-template-columns: 6rem minmax(0, 1.1fr) minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 1.5rem;
  padding: 2.2rem 1.2rem;
  overflow: hidden;
  isolation: isolate;
}
/* Número en contorno, como las fechas de las carreras */
.service::before {
  content: counter(service, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(2.6rem, 4vw, 3.8rem);
  line-height: .85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .5);
  transition: color .4s, -webkit-text-stroke-color .4s;
}
/* Barrido rojo inclinado al hover */
.service::after {
  content: "";
  position: absolute;
  inset: 0 -5%;
  z-index: -1;
  background: var(--red-grad);
  transform: skewX(var(--skew)) scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease);
}
.services__item:hover .service::after,
.services__item:focus-within .service::after { transform: skewX(var(--skew)) scaleX(1); }
.services__item:hover .service::before,
.services__item:focus-within .service::before { color: var(--white); -webkit-text-stroke-color: var(--white); }

.service__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1;
  text-transform: uppercase;
  transition: transform .5s var(--ease);
}
.services__item:hover .service__name,
.services__item:focus-within .service__name { transform: translateX(.6rem); }

.service__desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  transition: color .4s;
}
.services__item:hover .service__desc,
.services__item:focus-within .service__desc { color: rgba(255, 255, 255, .9); }

.service__arrow {
  position: relative;
  justify-self: end;
  width: 28px;
  height: 2px;
  background: var(--red);
  transition: transform .45s var(--ease), background .4s;
}
.service__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--red);
  border-right: 2px solid var(--red);
  transform: rotate(45deg);
  transition: border-color .4s;
}
.services__item:hover .service__arrow,
.services__item:focus-within .service__arrow { background: var(--white); transform: rotate(90deg); }
.services__item:hover .service__arrow::after,
.services__item:focus-within .service__arrow::after { border-color: var(--white); }

/* ---------- Ventajas ---------- */
.services__perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2.4rem;
  margin-top: 2.4rem;
}
.services__perks li {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #d0d0d0;
}
.services__perks li::before {
  content: "";
  width: 14px;
  height: 4px;
  background: var(--red-grad);
  transform: skewX(var(--skew));
}

@media (max-width: 800px) {
  .service {
    grid-template-columns: 3.6rem minmax(0, 1fr) 2rem;
    row-gap: .5rem;
    padding: 1.3rem .4rem;
  }
  .service__desc { grid-column: 2 / 3; grid-row: 2; }
  .service__arrow { grid-column: 3; grid-row: 1; }
}

/* ---------- Desplegable con el detalle del servicio ---------- */
.service__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease);
}
.services__item:hover .service__panel,
.services__item:focus-within .service__panel { grid-template-rows: 1fr; }

.service__panel-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 1.2rem 0 calc(6rem + 2.7rem);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .35s, transform .45s var(--ease), padding .55s var(--ease);
}
.services__item:hover .service__panel-inner,
.services__item:focus-within .service__panel-inner {
  padding-top: 2rem;
  padding-bottom: 2.4rem;
  opacity: 1;
  transform: none;
  transition-delay: .1s;
}

.service__lead {
  font-size: 1.15rem;
  line-height: 1.55;
  color: #e6e6e6;
}

.service__body {
  margin-top: 1.2rem;
}
.service__body p {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.65;
}

@media (max-width: 800px) {
  .service__panel-inner { padding-left: .4rem; padding-right: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .service__panel { transition: none; }
}

/* ==========================================================
   MARCAS (carrusel infinito de logos)
   ========================================================== */
.brands {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--black);
  border-bottom: 1px solid var(--line);
}
.brands__title {
  display: block;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}

/* Difumina los logos al entrar y salir por los lados */
.brands__viewport {
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.brands__track {
  display: flex;
  width: max-content;
  animation: ticker 40s linear infinite;
}
.brands:hover .brands__track { animation-play-state: paused; }

.brands__list {
  display: flex;
  align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
  padding: 0 clamp(3rem, 7vw, 6rem) 0 0; /* mismo hueco entre las dos copias */
  margin: 0;
  list-style: none;
}
.brands__list li {
  display: flex;
  align-items: center;
  height: 3.4rem;
}
/* Logos ya preparados en blanco sobre transparente; --h iguala el peso visual */
.brands__list img {
  display: block;
  height: var(--h, 2rem);
  width: auto;
  opacity: .55;
  transition: opacity .3s;
}
.brands__list img:hover { opacity: 1; }

@media (max-width: 640px) {
  .brands__list img { height: calc(var(--h, 2rem) * .8); }
}
@media (prefers-reduced-motion: reduce) {
  .brands__track { animation-duration: 120s; }
}

/* ==========================================================
   INSTAGRAM
   ========================================================== */
.insta {
  padding: clamp(4rem, 8vw, 6rem) 0 0;
  background: var(--black);
}

.insta__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}

.insta__handle {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .3s;
}
.insta__handle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
}
.insta__handle svg .dot { fill: var(--red); stroke: none; }
.insta__handle:hover { color: var(--red); }

/* Tira a sangre: 6 fotos 4:5 de borde a borde */
.insta__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.insta__tile {
  position: relative;
  aspect-ratio: 4 / 5; /* formato actual de Instagram: 1080 × 1350 */
  overflow: hidden;
  isolation: isolate;
}
.insta__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(.75);
  transition: transform .8s var(--ease), filter .5s;
}
/* Al hover: color, zoom y velo rojo suave */
.insta__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(198, 27, 24, .45), rgba(119, 50, 49, .45));
  opacity: 0;
  transition: opacity .4s;
}
.insta__tile:hover img { transform: scale(1.08); filter: none; }
.insta__tile:hover::after,
.insta__tile:focus-visible::after { opacity: 1; }

/* Sello central: círculo negro con el icono rojo, sobre el centro del grid */
.insta__badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(76px, 7vw, 112px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--black);
  box-shadow: 0 0 0 6px rgba(10, 10, 10, .35), 0 20px 50px rgba(0, 0, 0, .6);
  transform: translate(-50%, -50%);
  transition: transform .45s var(--ease), background .3s;
}
.insta__badge svg {
  width: 44%;
  height: 44%;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  transition: stroke .3s;
}
.insta__badge svg .dot { fill: var(--red); stroke: none; transition: fill .3s; }
.insta__badge:hover {
  background: var(--red-grad);
  transform: translate(-50%, -50%) scale(1.08) rotate(-8deg);
}
.insta__badge:hover svg { stroke: var(--white); }
.insta__badge:hover svg .dot { fill: var(--white); }

@media (max-width: 800px) {
  .insta__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================
   CTA CONTACTO — el hero en espejo: texto a la derecha,
   franja diagonal roja a la izquierda, sin foto
   ========================================================== */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 55vh;
  padding: clamp(3.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
  background:
    linear-gradient(245deg, transparent 62%, rgba(198, 27, 24, .3) 62%, rgba(119, 50, 49, .12) 100%),
    repeating-linear-gradient(58deg, transparent 0 40px, rgba(255, 255, 255, .025) 40px 42px),
    var(--black);
}

/* Foto a la izquierda, fundida a negro por la derecha y abajo (espejo del hero) */
.cta__media {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(58%, 1000px);
  -webkit-mask-image:
    linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, .08) 10%, rgba(0, 0, 0, .25) 22%, rgba(0, 0, 0, .5) 36%, rgba(0, 0, 0, .8) 52%, #000 66%),
    linear-gradient(0deg, transparent 0%, #000 18%),
    linear-gradient(180deg, transparent 0%, #000 14%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, .08) 10%, rgba(0, 0, 0, .25) 22%, rgba(0, 0, 0, .5) 36%, rgba(0, 0, 0, .8) 52%, #000 66%),
    linear-gradient(0deg, transparent 0%, #000 18%),
    linear-gradient(180deg, transparent 0%, #000 14%);
  mask-composite: intersect;
}
.cta__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: grayscale(1) contrast(1.15) brightness(.75);
}
/* Franja roja suave por encima de la foto */
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(245deg, transparent 70%, rgba(198, 27, 24, .14) 70%, rgba(119, 50, 49, .08) 100%);
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  text-align: right;
}

.cta__title {
  margin-top: .6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.6rem, 10vw, 9.5rem);
  line-height: .82;
  text-transform: uppercase;
}
.cta__title em {
  background: var(--red-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em;
}

.cta__ctas { justify-content: flex-end; }

@media (max-width: 800px) {
  .cta { min-height: 0; padding-top: 68vw; }
  .cta__media {
    width: 100%;
    bottom: auto;
    height: 75vw;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 50%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 50%);
  }
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 3vw, 2.5rem) 2rem;
  background: var(--black);
  overflow: hidden;
}
/* Marca de agua gigante */
.footer::before {
  content: "THE DOC";
  position: absolute;
  left: 50%;
  bottom: -.18em;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(8rem, 26vw, 26rem);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .05);
  pointer-events: none;
}

.footer__top {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 2.5rem;
  padding-bottom: 3.5rem;
}

.footer__brand img { width: 110px; height: auto; }
.footer__brand p {
  max-width: 30ch;
  margin: 1.2rem 0 1.4rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}
.footer__social {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.footer__social svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2; }
.footer__social svg .dot { fill: var(--white); stroke: none; }
.footer__social:hover { background: var(--red-grad); border-color: transparent; }
.footer__socials { display: flex; gap: .6rem; }
.footer__social svg.fill { fill: var(--white); stroke: none; width: 22px; height: 22px; }
/* Icono de Wallapop: PNG blanco sobre transparente */
.footer__brand .icon-wallapop {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.footer__col { display: flex; flex-direction: column; gap: .55rem; }
.footer__col h3 {
  position: relative;
  margin-bottom: .8rem;
  padding-top: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.footer__col h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 3px;
  background: var(--red-grad);
  transform: skewX(var(--skew));
}
.footer__col a,
.footer__col p {
  color: #bdbdbd;
  font-size: .95rem;
  line-height: 1.6;
}
.footer__col a { transition: color .25s; }
.footer__col a:hover { color: var(--white); }
.footer__col strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: var(--white);
}
.footer__muted { color: #7a7a7a !important; font-size: .9rem !important; }

.footer__bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: #7a7a7a;
}
.footer__legal { display: flex; gap: 1.6rem; }
.footer__legal a { transition: color .25s; }
.footer__legal a:hover { color: var(--white); }

@media (max-width: 1000px) {
  .footer__top { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; }
}


/* ==========================================================
   PÁGINA CALENDARIO — hero de página (versión baja del hero)
   ========================================================== */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 72vh;
  padding: calc(var(--topbar-h) + var(--nav-h) + 3rem) clamp(1rem, 3vw, 2.5rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
  background:
    repeating-linear-gradient(-58deg, transparent 0 40px, rgba(255, 255, 255, .025) 40px 42px),
    var(--black);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 70%, rgba(198, 27, 24, .14) 70%, rgba(119, 50, 49, .08) 100%);
  pointer-events: none;
}
.page-hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(62%, 1100px);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .3) 12%, rgba(0, 0, 0, .7) 28%, #000 45%),
    linear-gradient(0deg, transparent 0%, #000 30%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .3) 12%, rgba(0, 0, 0, .7) 28%, #000 45%),
    linear-gradient(0deg, transparent 0%, #000 30%);
  mask-composite: intersect;
}
.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 55%;
  filter: grayscale(1) contrast(1.15) brightness(.7);
  animation: hero-fade 1.2s ease-out both;
}
.page-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, .7) 0%, transparent 30%);
}
.page-hero--full {
  min-height: 100vh;
  min-height: 100svh;
}
/* El calendario no queda tapado por la navbar fija al hacer scroll */
.cal { scroll-margin-top: 40px; }

/* Indicador de scroll: línea con un punto rojo que baja */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 2;
  width: 2px;
  height: 56px;
  background: rgba(255, 255, 255, .2);
  transform: translateX(-50%);
  overflow: hidden;
}
.scroll-cue span {
  position: absolute;
  left: 0;
  top: -20px;
  width: 100%;
  height: 20px;
  background: var(--red);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

.page-hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.page-hero h1 {
  margin-top: .6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 9vw, 8rem);
  line-height: .82;
  text-transform: uppercase;
}
.page-hero h1 em {
  background: var(--red-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em;
}
.page-hero__lead {
  max-width: 48ch;
  margin-top: 1.6rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #c4c4c4;
}

/* ==========================================================
   CALENDARIO
   ========================================================== */
.cal {
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem) clamp(4rem, 8vw, 6rem);
  background: var(--black);
}
.cal > * { max-width: 1280px; margin-inline: auto; }

.cal-filter {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cal__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid var(--white);
}
.cal__filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.cal__filters label {
  position: relative;
  padding: .55rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #bdbdbd;
  cursor: pointer;
  isolation: isolate;
  transition: color .3s;
}
.cal__filters label::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--line);
  transform: skewX(var(--skew));
  transition: background .3s, border-color .3s;
}
.cal__filters label:hover { color: var(--white); }
.cal__filters label:hover::before { border-color: var(--red); }

/* Filtro activo */
.cal:has(#f-all:checked) label[for="f-all"],
.cal:has(#f-mtb:checked) label[for="f-mtb"],
.cal:has(#f-gravel:checked) label[for="f-gravel"],
.cal:has(#f-road:checked) label[for="f-road"] { color: var(--white); }
.cal:has(#f-all:checked) label[for="f-all"]::before,
.cal:has(#f-mtb:checked) label[for="f-mtb"]::before,
.cal:has(#f-gravel:checked) label[for="f-gravel"]::before,
.cal:has(#f-road:checked) label[for="f-road"]::before { background: var(--red-grad); border-color: transparent; }
.cal-filter:focus-visible + * { outline: none; }

/* Filtrado */
.cal:has(#f-mtb:checked) .cal-row:not([data-type="mtb"]),
.cal:has(#f-gravel:checked) .cal-row:not([data-type="gravel"]),
.cal:has(#f-road:checked) .cal-row:not([data-type="road"]) { display: none; }

.cal__count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal__count b { color: var(--white); font-size: 1.3rem; }

/* ---------- Filas ---------- */
.cal__list { list-style: none; }

.cal-row {
  position: relative;
  display: grid;
  grid-template-columns: 8.5rem 150px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
/* Barrido rojo muy suave al hover */
.cal-row::after {
  content: "";
  position: absolute;
  inset: 0 -1.2rem;
  z-index: -1;
  background: linear-gradient(90deg, rgba(198, 27, 24, .12), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
}
.cal-row:hover::after { opacity: 1; }

.cal-row__date {
  display: flex;
  align-items: center;
  gap: .9rem;
}
.cal-row__date b {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 4.2rem;
  line-height: .85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .5);
  transition: color .4s, -webkit-text-stroke-color .4s;
}
/* Barra "/" gris suave entre el día y el mes/año */
.cal-row__date b::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: .95em;
  margin-left: .9rem;
  vertical-align: -.05em;
  background: rgba(255, 255, 255, .25);
  transform: skewX(-20deg);
}
.cal-row__date span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.25;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
}
.cal-row:hover .cal-row__date b { color: var(--white); -webkit-text-stroke-color: var(--white); }

.cal-row__thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
}
.cal-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(.75);
  transition: transform .8s var(--ease), filter .5s;
}
.cal-row:hover .cal-row__thumb img { transform: scale(1.08); filter: none; }

.cal-row__info h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1;
  text-transform: uppercase;
}
.cal-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  margin-top: .6rem;
  font-size: .95rem;
  color: var(--muted);
}
.cal-row__meta span { display: inline-flex; align-items: center; gap: .45rem; }
.cal-row__meta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cal-row__tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}
.cal-row__tags em {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tag-type {
  padding: .25rem .7rem;
  border: 1px solid var(--line);
  color: #d0d0d0;
}
.tag-status { color: var(--muted); }
/* Bandera de cuadros (la del ticker) junto a "Finalizada" */
.cal-row.is-done .tag-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.cal-row.is-done .tag-status::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22currentColor%22%3E%3Cpath d=%22M227.32,48.75A8,8,0,0,0,218.76,50c-28,24.22-51.72,12.48-79.21-1.13C111.07,34.76,78.78,18.79,42.76,50h0A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,227.32,48.75ZM56,160.44V109.88c16.85-11.28,32.64-11.59,48-7.34v51.74C88.87,150.47,72.87,150.71,56,160.44ZM104,50.87c9.25,2.83,18.61,7.45,28.45,12.32,11.26,5.57,23.11,11.43,35.55,14.56v51.74c15.35,4.25,31.14,3.94,48-7.35v50.11c-16.87,13.32-32.27,13.72-48,8.91V129.49c-21.62-6-42.38-21-64-26.95Z%22/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22currentColor%22%3E%3Cpath d=%22M227.32,48.75A8,8,0,0,0,218.76,50c-28,24.22-51.72,12.48-79.21-1.13C111.07,34.76,78.78,18.79,42.76,50h0A8,8,0,0,0,40,56V224a8,8,0,0,0,16,0V179.77c26.79-21.16,49.87-9.75,76.45,3.41,16.4,8.11,34.06,16.85,53,16.85,13.93,0,28.54-4.75,43.82-18a8,8,0,0,0,2.76-6V56A8,8,0,0,0,227.32,48.75ZM56,160.44V109.88c16.85-11.28,32.64-11.59,48-7.34v51.74C88.87,150.47,72.87,150.71,56,160.44ZM104,50.87c9.25,2.83,18.61,7.45,28.45,12.32,11.26,5.57,23.11,11.43,35.55,14.56v51.74c15.35,4.25,31.14,3.94,48-7.35v50.11c-16.87,13.32-32.27,13.72-48,8.91V129.49c-21.62-6-42.38-21-64-26.95Z%22/%3E%3C/svg%3E") center / contain no-repeat;
}

.cal-row__cta { height: 46px; padding: 0 1.6rem; }

/* Estados */
.cal-row.is-done .cal-row__info h3,
.cal-row.is-done .cal-row__date b { opacity: .55; }
.cal-row.is-done:hover .cal-row__info h3,
.cal-row.is-done:hover .cal-row__date b { opacity: 1; }

.cal-row.is-live .tag-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--white);
}
.cal-row.is-live .tag-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(198, 27, 24, .7);
  animation: live 1.6s infinite;
}
@keyframes live {
  70%  { box-shadow: 0 0 0 10px rgba(198, 27, 24, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 27, 24, 0); }
}
.cal-row.is-live .cal-row__date b { color: var(--white); -webkit-text-stroke-color: var(--white); }

/* ---------- Garantía ---------- */
.cal-guarantee {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.6rem 2.4rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: 2rem 2.2rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(115deg, transparent 78%, rgba(198, 27, 24, .14) 78%, rgba(119, 50, 49, .06) 100%),
    var(--ink);
}
.cal-guarantee__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--black);
}
.cal-guarantee__icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cal-guarantee h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.6rem;
  text-transform: uppercase;
}
.cal-guarantee p {
  max-width: 70ch;
  margin-top: .4rem;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cal-row { grid-template-columns: 7.5rem 120px minmax(0, 1fr) auto; }
  .cal-row__cta { display: none; }
}
@media (max-width: 760px) {
  .page-hero__media {
    width: 100%;
    bottom: 30%;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 50%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 50%);
  }
  .cal-row {
    grid-template-columns: 6.2rem minmax(0, 1fr);
    gap: 1rem 1.2rem;
  }
  .cal-row__date { flex-direction: column; align-items: flex-start; gap: .3rem; }
  .cal-row__date b::after { display: none; }
  .cal-row__date b { font-size: 3.2rem; }
  .cal-row__thumb { display: none; }
  .cal-row__tags { grid-column: 2; flex-direction: row; align-items: center; }
  .cal-guarantee { grid-template-columns: 1fr; }
}

/* ==========================================================
   FICHA DE CARRERA
   ========================================================== */
.race-hero { min-height: 78vh; }

.crumbs {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
}
.crumbs a { color: var(--muted); transition: color .25s; }
.crumbs a:hover { color: var(--white); }
.crumbs span:not(:last-child) { color: rgba(255, 255, 255, .25); }

/* ---------- Datos clave: bajo el título de "La carrera" ---------- */
.race-facts {
  display: grid;
  border-top: 1px solid var(--line);
}
.race-facts > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
}
.race-facts dt {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.race-facts dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.race-facts svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.race-hero .hero__ctas { align-items: center; }

/* Distintivo "Tienda oficial / Servicio técnico" sobre la franja roja del hero */
.race-badge {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1.5rem, 4vw, 3rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.6rem 1rem 1.2rem;
  background: var(--red-grad);
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
  padding-left: 2rem;
}
.race-badge svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.race-badge span {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1;
  text-transform: uppercase;
}
.race-badge small {
  margin-bottom: .25rem;
  font-style: normal;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .8);
}
@media (max-width: 760px) {
  .race-badge { position: static; align-self: flex-start; margin-top: 2rem; }
  .race-hero { flex-direction: column; justify-content: flex-end; align-items: stretch; }
}

.race-status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.race-status::before { content: ""; flex-shrink: 0; }
.race-status.is-done { color: var(--muted); }
.race-status.is-done::before {
  width: 15px;
  height: 15px;
  background: var(--red);
  -webkit-mask: var(--flag) center / contain no-repeat;
  mask: var(--flag) center / contain no-repeat;
}
.race-status.is-live { color: var(--white); border-color: var(--red); }
.race-status.is-live::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: live 1.6s infinite;
}

/* ---------- La carrera: título a la izquierda, texto a la derecha ---------- */
.race-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 7vw, 8rem);
  /* Contenido centrado en 1400px, como las portadas de calendario y contacto */
  padding: clamp(4.5rem, 9vw, 7rem) max(clamp(1rem, 3vw, 2.5rem), (100% - 1400px) / 2);
}
.race-about__title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  line-height: .95;
  text-transform: uppercase;
}
.race-about__head { grid-column: 1; grid-row: 1; }
.race-about .race-facts { grid-column: 1; grid-row: 2; max-width: 480px; }
/* Descripción a la derecha, empezando donde terminan los datos */
.race-about__text { grid-column: 2; grid-row: 3; max-width: 640px; margin-top: -2.5rem; padding-top: 1.6rem; }
.race-about__text p {
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}
.race-about__text p:last-child { margin-bottom: 0; }
/* Cifras destacadas al final de la descripción */
.race-about__text strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
}

/* ---------- Ventajas (Titan) ---------- */
.race-perks {
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1rem, 3vw, 2.5rem);
  background:
    linear-gradient(115deg, transparent 78%, rgba(198, 27, 24, .14) 78%, rgba(119, 50, 49, .06) 100%),
    var(--ink);
}
.race-perks ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem 2.4rem;
  margin-top: 2.4rem;
}
.race-perks li {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  color: #d8d8d8;
  line-height: 1.5;
}
.race-perks svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: .1rem;
  fill: none;
  stroke: var(--red);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Precios ---------- */
.race-prices {
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 3vw, 2.5rem);
  background: var(--black);
}
.race-prices__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.4rem;
}
.race-prices__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.6rem;
  border: 1px solid var(--line);
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .3s, transform .4s var(--ease);
}
.price-card:hover { border-color: var(--red); transform: translateY(-4px); }
.price-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.price-card__amount { margin: 1.2rem 0 .8rem; }
.price-card__amount b {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 3.6rem;
  line-height: .9;
}
.price-card__amount small { margin-left: .2rem; font-size: .5em; color: var(--red); }
.price-card__amount .is-ask { font-size: 2.2rem; color: var(--muted); }
.price-card__note { margin-top: auto; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.price-card.is-featured h3 { padding-right: 3.6rem; }
.price-card.is-featured {
  border-color: transparent;
  background: var(--red-grad);
}
.price-card.is-featured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(rgba(0, 0, 0, .1) 0 25%, transparent 0 50%) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(225deg, #000, transparent 60%);
  mask-image: linear-gradient(225deg, #000, transparent 60%);
}
.price-card.is-featured .price-card__amount small,
.price-card.is-featured .price-card__amount .is-ask,
.price-card.is-featured .price-card__note { color: rgba(255, 255, 255, .85); }
.price-card__badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  padding: .2rem .6rem;
  background: var(--black);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.race-prices__note,
.race-prices__code {
  max-width: 62ch;
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  color: #c4c4c4;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  text-align: center;
}
.race-prices__code b { color: var(--white); }

.race-sub {
  margin-bottom: 1.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.6rem;
  text-transform: uppercase;
}
.race-steps { margin-top: 3rem; }
.race-steps ol {
  list-style: none;
  counter-reset: rs;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem 2rem;
}
.race-steps li {
  counter-increment: rs;
  position: relative;
  padding-top: 1.2rem;
  color: #c4c4c4;
  line-height: 1.55;
}
.race-steps li::before {
  content: counter(rs, decimal-leading-zero);
  display: block;
  margin-bottom: .4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 2.6rem;
  line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .35);
}
.race-steps li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-deep)) 0 0 / 34px 100% no-repeat, var(--line);
  transform: skewX(var(--skew));
}

.race-tax { margin-top: 1.6rem; color: #7a7a7a; font-size: .85rem; line-height: 1.6; }
.race-tax summary { cursor: pointer; width: fit-content; transition: color .25s; }
.race-tax summary:hover { color: var(--white); }
.race-tax p { max-width: 90ch; margin-top: .6rem; }

/* ---------- Anterior / siguiente ---------- */
.race-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--black);
}
.race-nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .3rem;
  min-height: 180px;
  padding: 2rem clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
  isolation: isolate;
}
.race-nav__link.is-next { align-items: flex-end; text-align: right; }
.race-nav__link img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(.35);
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .5s, transform .8s var(--ease);
}
.race-nav__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(198, 27, 24, .35), transparent);
  opacity: 0;
  transition: opacity .5s;
}
.race-nav__link.is-next::after { background: linear-gradient(270deg, rgba(198, 27, 24, .35), transparent); }
.race-nav__link:hover img { opacity: 1; transform: none; }
.race-nav__link:hover::after { opacity: 1; }
.race-nav__dir {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
}
.race-nav__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
}
.race-nav__all {
  display: grid;
  place-items: center;
  width: 110px;
  border-inline: 1px solid var(--line);
  transition: background .3s;
}
.race-nav__all svg { width: 26px; height: 26px; fill: none; stroke: var(--white); stroke-width: 1.8; }
.race-nav__all:hover { background: var(--red-grad); }

@media (max-width: 1000px) {
  .race-about { grid-template-columns: 1fr; }
  .race-about__head, .race-about .race-facts, .race-about__text { grid-column: 1; grid-row: auto; }
}
@media (max-width: 640px) {
  .race-nav { grid-template-columns: 1fr 1fr; }
  .race-nav__all { display: none; }
  .race-nav__link { min-height: 130px; }
}

/* ==========================================================
   PÁGINA CONTACTO
   ========================================================== */
/* <main> como contenedor: la cinta usa cqw (ancho de página) para salir a sangre */
.main--contact { container-type: inline-size; }

/* Portada como las demás: texto a la izquierda, formulario sobre la foto,
   y los datos de contacto corriendo en la base */
.page-hero--contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(640px, 46%);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: 100vh;
  min-height: 100svh;
  /* Contenido centrado en 1400px; foto y cinta siguen a sangre */
  padding-inline: max(clamp(1rem, 3vw, 2.5rem), (100% - 1400px) / 2);
  padding-bottom: 0;
}
.page-hero--contact .page-hero__content { grid-column: 1; grid-row: 1; }
.page-hero--contact .contact__form { grid-column: 2; grid-row: 1; z-index: 3; }
.page-hero--contact .info-strip {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 2;
  margin-inline: calc(-1 * max(clamp(1rem, 3vw, 2.5rem), (100cqw - 1400px) / 2)); /* a sangre */
  background: rgba(10, 10, 10, .6);
  border-bottom: 0;
}

/* Card roja con esquinas cortadas en diagonal */
.contact__form {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  /* Rojo apagado: del rojo profundo de la marca a casi negro */
  background: linear-gradient(135deg, rgba(138, 23, 20, .72) 0%, rgba(119, 50, 49, .62) 45%, rgba(43, 21, 20, .7) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 32px 100%, 0 calc(100% - 32px));
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
  margin-bottom: 1.4rem;
}

.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.field__label small {
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: none;
  color: rgba(255, 255, 255, .7);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .75rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--white);
  background: rgba(10, 10, 10, .55);
  border: 1px solid transparent;
  border-radius: 0;
  transition: border-color .25s, background-color .25s;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field select {
  appearance: none;
  padding-right: 2.6rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--white) 50%) calc(100% - 1.3rem) 50% / 6px 6px no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--white) 50%) calc(100% - 1rem + 1px) 50% / 6px 6px no-repeat,
    rgba(10, 10, 10, .55);
}
.field select:invalid { color: var(--muted); }
.field option { color: var(--white); background: var(--ink); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--white);
  background-color: rgba(10, 10, 10, .75);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.6rem;
  font-size: .9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
}
.check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: .15rem;
  accent-color: var(--black);
}
.contact__form { display: flex; flex-direction: column; align-items: center; }
.contact__grid { width: 100%; }
.check a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* Botón invertido dentro de la card: blanco con barrido negro */
.contact__form .btn--race { color: var(--black); }
.contact__form .btn--race::before { background: var(--white); }
.contact__form .btn--race::after { background: var(--black); }
.contact__form .btn--race:hover { color: var(--white); }

@media (max-width: 1100px) {
  .page-hero--contact { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; }
  .page-hero--contact .contact__form { grid-column: 1; grid-row: auto; }
  .page-hero--contact .info-strip { grid-row: auto; }
}
@media (max-width: 560px) {
  .contact__grid { grid-template-columns: 1fr; }
}

/* Cinta de datos de contacto: reutiliza el carrusel de marcas */
.info-strip { border-top: 1px solid var(--line); }
.info-strip .brands__track { animation-duration: 35s; }
.info-strip__list li {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .35rem;
  position: relative;
  height: auto;
  white-space: nowrap;
}
/* Separador: barra inclinada roja entre datos */
.info-strip__list li::before {
  content: "";
  position: absolute;
  left: calc(clamp(3rem, 7vw, 6rem) / -2);
  top: 50%;
  width: 3px;
  height: 2.2rem;
  background: var(--red-grad);
  transform: translateY(-50%) skewX(-20deg);
}
.info-strip__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--red);
}
.info-strip__list a,
.info-strip__list li > span:last-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
  transition: color .25s;
}
.info-strip__list a:hover { color: var(--red); }

/* Mapa a sangre, oscurecido para encajar con la web */
.contact-map {
  height: clamp(320px, 45vw, 520px);
  background: var(--ink);
}
.contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(.92) contrast(.9);
}


/* ==========================================================
   TIENDA
   ========================================================== */
/* ---------- ¿No encuentras lo que buscas? (antes del carrusel de marcas) ---------- */
.shop-ask {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
  background:
    linear-gradient(115deg, transparent 62%, rgba(198, 27, 24, .16) 62%, rgba(119, 50, 49, .08) 100%),
    var(--ink);
  border-top: 1px solid var(--line);
}
.shop-ask__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem clamp(2rem, 6vw, 6rem);
  max-width: 1280px;
  margin-inline: auto;
}
.shop-ask__side { max-width: 440px; }
.shop-ask__side p {
  margin-bottom: 1.8rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #c4c4c4;
}

/* ---------- Destacados en la home ---------- */
.home-shop {
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 3vw, 2.5rem);
  background: var(--black);
}
.home-shop__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
/* .home-shop delante para ganar a .shop__grid, que va más abajo */
.home-shop .home-shop__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* Pantallas estrechas: misma fila, con scroll horizontal */
@media (max-width: 1200px) {
  .home-shop .home-shop__grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
  }
  .home-shop .product { scroll-snap-align: start; }
  .home-shop .product:hover { transform: none; }
}
@media (max-width: 560px) {
  .home-shop .home-shop__grid { grid-auto-columns: 78%; }
}

.shop {
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem) clamp(4rem, 8vw, 6rem);
  background: var(--black);
}
.shop > * { max-width: 1280px; margin-inline: auto; }

/* Anclas de filtro: el menú enlaza a tienda.html#ocasion, etc. */
.shop__anchor {
  display: block;
  height: 0;
  scroll-margin-top: calc(var(--topbar-h) + var(--nav-h) + 1.5rem);
}

/* ---------- Filtros ---------- */
.shop__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid var(--white);
}
.shop__group {
  margin: 0 .3rem 0 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--red);
}
.shop__filter {
  position: relative;
  padding: .55rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #bdbdbd;
  isolation: isolate;
  transition: color .3s;
}
.shop__filter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--line);
  transform: skewX(var(--skew));
  transition: background .3s, border-color .3s;
}
.shop__filter:hover { color: var(--white); }
.shop__filter:hover::before { border-color: var(--red); }

/* Filtro activo: "Todo" si no hay categoría en la URL */
.shop:not(:has(.shop__anchor:target)) .shop__filter--all,
.shop:has(#ocasion:target) [data-f="ocasion"],
.shop:has(#ofertas:target) [data-f="ofertas"],
.shop:has(#componentes:target) [data-f="componentes"],
.shop:has(#equipamiento:target) [data-f="equipamiento"],
.shop:has(#electronica:target) [data-f="electronica"],
.shop:has(#ropa:target) [data-f="ropa"] { color: var(--white); }
.shop:not(:has(.shop__anchor:target)) .shop__filter--all::before,
.shop:has(#ocasion:target) [data-f="ocasion"]::before,
.shop:has(#ofertas:target) [data-f="ofertas"]::before,
.shop:has(#componentes:target) [data-f="componentes"]::before,
.shop:has(#equipamiento:target) [data-f="equipamiento"]::before,
.shop:has(#electronica:target) [data-f="electronica"]::before,
.shop:has(#ropa:target) [data-f="ropa"]::before { background: var(--red-grad); border-color: transparent; }

/* Filtrado */
.shop:has(#ocasion:target) .product:not([data-cat="ocasion"]),
.shop:has(#ofertas:target) .product:not([data-cat="ofertas"]),
.shop:has(#componentes:target) .product:not([data-cat="componentes"]),
.shop:has(#equipamiento:target) .product:not([data-cat="equipamiento"]),
.shop:has(#electronica:target) .product:not([data-cat="electronica"]),
.shop:has(#ropa:target) .product:not([data-cat="ropa"]) { display: none; }

/* ---------- Rejilla de productos ---------- */
.shop__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  list-style: none;
}

.product {
  display: flex;
  flex-direction: column;
  background: var(--ink);
  border: 1px solid var(--line);
  transition: border-color .3s, transform .45s var(--ease);
}
.product:hover { border-color: rgba(198, 27, 24, .6); transform: translateY(-4px); }

.product__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--steel);
}
.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.product:hover .product__media img { transform: scale(1.05); }
/* Fotos de catálogo sobre fondo blanco: producto entero, sin recortar */
.product__media--contain { background: var(--white); }
.product__media--contain img { object-fit: contain; padding: 1.2rem; }

/* Sin foto todavía: logo The Doc atenuado */
.product__ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #4a4a4a;
}
.product__ph::before {
  content: "";
  width: 38%;
  aspect-ratio: 1028 / 836;
  background: url("../img/thedoc-loog.png") center / contain no-repeat;
  opacity: .12;
}

.product__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: .3rem .7rem;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red-grad);
  transform: skewX(var(--skew));
}
.product__badge--used { color: var(--black); background: var(--white); }

.product__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.3rem 1.3rem 1.1rem;
}
.product__cat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
}
.product__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.05;
  text-transform: uppercase;
}
.product__detail { font-size: .92rem; color: var(--muted); }
.product__price {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  margin-top: auto;
  padding-top: .9rem;
  font-family: var(--font-display);
}
.product__price b { font-weight: 800; font-size: 1.7rem; letter-spacing: .02em; }
.product__price s { font-weight: 600; font-size: 1.05rem; color: #6f6f6f; }

.product__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .95rem 1.3rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .3s, border-color .3s;
}
.product__cta i {
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform .35s var(--ease);
}
.product__cta i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.product__cta:hover { background: var(--red-grad); border-color: transparent; }
.product__cta:hover i { transform: translateX(4px); }

/* Categoría vacía */
.shop__empty {
  display: none;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border: 1px dashed var(--line);
  font-size: 1.05rem;
  color: var(--muted);
  text-align: center;
}
.shop__empty a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.shop__empty a:hover { color: var(--red); }
.shop:has(#ocasion:target):not(:has(.product[data-cat="ocasion"])) .shop__empty,
.shop:has(#ofertas:target):not(:has(.product[data-cat="ofertas"])) .shop__empty,
.shop:has(#componentes:target):not(:has(.product[data-cat="componentes"])) .shop__empty,
.shop:has(#equipamiento:target):not(:has(.product[data-cat="equipamiento"])) .shop__empty,
.shop:has(#electronica:target):not(:has(.product[data-cat="electronica"])) .shop__empty,
.shop:has(#ropa:target):not(:has(.product[data-cat="ropa"])) .shop__empty { display: block; }


@media (max-width: 640px) {
  .shop__group { width: 100%; margin: .6rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .product, .product__media img { transition: none; }
}

/* ==========================================================
   FICHA DE PRODUCTO
   ========================================================== */
.pdp {
  padding: calc(var(--topbar-h) + var(--nav-h) + 2rem) clamp(1rem, 3vw, 2.5rem) clamp(3rem, 6vw, 4.5rem);
  background:
    repeating-linear-gradient(-58deg, transparent 0 40px, rgba(255, 255, 255, .025) 40px 42px),
    var(--black);
}
.pdp > * { max-width: 1280px; margin-inline: auto; }

.pdp__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.pdp__crumbs a { transition: color .25s; }
.pdp__crumbs a:hover { color: var(--white); }
.pdp__crumbs span { color: var(--red); }
.pdp__crumbs b { font-weight: 600; color: var(--white); }

.pdp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* Foto principal */
.pdp__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--steel);
  cursor: zoom-in;
}
.pdp__media img { width: 100%; height: 100%; object-fit: cover; }
.pdp__media .product__badge { top: 1.4rem; left: 1.4rem; font-size: .85rem; }

/* Datos y compra */
.pdp__info { display: flex; flex-direction: column; }
.pdp__title {
  margin-top: .5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: .9;
  text-transform: uppercase;
}
.pdp__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 1rem;
  margin-top: 1.4rem;
  font-family: var(--font-display);
}
.pdp__price b { font-weight: 800; font-size: 2.6rem; letter-spacing: .02em; }
.pdp__price s { font-weight: 600; font-size: 1.3rem; color: #6f6f6f; }
.pdp__price small {
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--muted);
}

.pdp__desc {
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.pdp__desc p { margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.7; color: #c4c4c4; }
.pdp__desc p:last-child { margin-bottom: 0; }
.pdp__desc-title {
  margin-bottom: .9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.pdp__specs { display: grid; gap: .55rem; margin-bottom: 1.2rem; list-style: none; }
.pdp__specs li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--white);
}
.pdp__specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 12px;
  height: 3px;
  background: var(--red-grad);
  transform: skewX(var(--skew));
}
/* Aviso importante (p. ej. qué incluye la venta) */
.pdp__notice {
  display: inline-block;
  padding: .55rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem !important;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white) !important;
  border: 1px solid var(--red);
  background: rgba(198, 27, 24, .12);
}

/* Selector de talla */
.pdp__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2rem;
  border: 0;
}
.pdp__sizes legend {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: .9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.pdp__sizes legend span {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--red);
}
.pdp__sizes label { position: relative; cursor: pointer; }
.pdp__sizes input { position: absolute; opacity: 0; pointer-events: none; }
.pdp__sizes label span {
  display: grid;
  place-items: center;
  min-width: 3.4rem;
  height: 3rem;
  padding: 0 .9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .08em;
  border: 1px solid rgba(255, 255, 255, .25);
  transition: border-color .25s, background .25s, color .25s;
}
.pdp__sizes label:hover span { border-color: var(--white); }
.pdp__sizes input:checked + span { color: var(--black); background: var(--white); border-color: var(--white); }
.pdp__sizes input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
/* Tallas sin stock: tachadas */
.pdp__sizes input:disabled + span {
  color: #4a4a4a;
  border-color: var(--line);
  background: linear-gradient(to top right, transparent calc(50% - 1px), #3a3a3a, transparent calc(50% + 1px));
  cursor: not-allowed;
}

.pdp__add { width: 100%; height: 56px; margin-top: 1.6rem; font-size: 1.05rem; }
.pdp__add.is-added::before { background: var(--white); }
.pdp__add.is-added { color: var(--black); }

.pdp__perks {
  display: grid;
  gap: .7rem;
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: .95rem;
  color: #bdbdbd;
}
.pdp__perks li { position: relative; padding-left: 1.6rem; }
.pdp__perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 12px;
  height: 3px;
  background: var(--red-grad);
  transform: skewX(var(--skew));
}
.pdp__perks a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.pdp__perks a:hover { color: var(--red); }

/* Miniaturas bajo la foto principal; al pulsar se abre el visor */
.pdp__gallery { display: grid; gap: .7rem; }
.pdp__thumbs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .5rem;
  list-style: none;
}
.pdp__thumbs li { aspect-ratio: 1; overflow: hidden; background: var(--steel); }
.pdp__thumbs button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: zoom-in;
  transition: border-color .25s;
}
.pdp__thumbs button:hover { border-color: var(--red); }
.pdp__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .75;
  transition: opacity .25s;
}
.pdp__thumbs button:hover img { opacity: 1; }

/* Visor de fotos a pantalla completa */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: clamp(3.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
  border: 0;
  background: rgba(10, 10, 10, .96);
  color: var(--white);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}
.lightbox__close {
  top: 1rem;
  right: 1.2rem;
  font-size: 2.6rem;
  line-height: 1;
  transition: color .25s;
}
.lightbox__close:hover { color: var(--red); }
.lightbox__nav {
  top: 50%;
  width: 3rem;
  height: 3rem;
  transform: translateY(-50%);
}
.lightbox__nav::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transition: border-color .25s;
}
.lightbox__nav--prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__nav--prev::before { transform: rotate(-135deg); }
.lightbox__nav--next { right: clamp(.5rem, 2vw, 1.5rem); }
.lightbox__nav--next::before { transform: rotate(45deg); }
.lightbox__nav:hover::before { border-color: var(--red); }
.lightbox__count {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .2em;
  color: var(--muted);
}

/* También te pueden interesar: reutiliza los destacados de la home */
.pdp-related { border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .pdp__thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================
   CESTA — panel lateral + página
   ========================================================== */
.badge[hidden] { display: none; }

/* ---------- Línea de producto (panel y página) ---------- */
.cart-line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-line__img { display: block; aspect-ratio: 1; overflow: hidden; background: var(--white); }
.cart-line__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__info { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.cart-line__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.05;
  text-transform: uppercase;
  transition: color .25s;
}
.cart-line__name:hover { color: var(--red); }
.cart-line__meta { font-size: .88rem; color: var(--muted); }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; text-align: right; }
.cart-line__price { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.cart-line__side s { font-family: var(--font-display); font-size: .9rem; color: #6f6f6f; }
.cart-line__remove {
  margin-top: .4rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .25s;
}
.cart-line__remove:hover { color: var(--red); }

.cart-qty {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: .4rem;
  border: 1px solid rgba(255, 255, 255, .25);
}
.cart-qty button {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .25s;
}
.cart-qty button:hover { background: rgba(255, 255, 255, .08); }
.cart-qty span { min-width: 2rem; text-align: center; font-family: var(--font-display); font-weight: 700; }

/* ---------- Panel lateral ---------- */
.cart-drawer { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.cart-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .4s;
}
.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  padding: 0 clamp(1.2rem, 3vw, 2rem);
  background: var(--ink);
  border-left: 3px solid var(--red);
  transform: translateX(100%);
  transition: transform .5s var(--ease);
}
.cart-open { overflow: hidden; }
.cart-open .cart-drawer { pointer-events: auto; }
.cart-open .cart-drawer__overlay { opacity: 1; }
.cart-open .cart-drawer__panel { transform: none; }

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-drawer__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  text-transform: uppercase;
}
.cart-drawer__head h2 span { color: var(--red); }
.cart-drawer__close {
  border: 0;
  background: none;
  color: var(--white);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color .25s;
}
.cart-drawer__close:hover { color: var(--red); }
.cart-drawer__added {
  margin-top: 1rem;
  padding: .7rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(198, 27, 24, .14);
  border-left: 3px solid var(--red);
}
.cart-drawer__list { flex: 1; overflow-y: auto; list-style: none; }
.cart-drawer__empty { display: none; flex: 1; flex-direction: column; align-items: flex-start; gap: 1.2rem; padding-top: 2rem; color: var(--muted); }
.cart-drawer.is-empty .cart-drawer__empty { display: flex; }
.cart-drawer.is-empty .cart-drawer__list,
.cart-drawer.is-empty .cart-drawer__foot { display: none; }
.cart-drawer__foot { padding: 1.4rem 0 1.6rem; border-top: 1px solid var(--line); }
.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.cart-drawer__total b { font-weight: 800; font-size: 2rem; letter-spacing: .02em; }
.cart-drawer__note { margin: .3rem 0 1.2rem; font-size: .85rem; color: var(--muted); }
.cart-drawer__cta { width: 100%; height: 52px; }
.cart-drawer__continue {
  display: block;
  width: 100%;
  margin-top: .9rem;
  padding: .4rem;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color .25s;
}
.cart-drawer__continue:hover { color: var(--white); }

/* ---------- Página de cesta ---------- */
.cart-page {
  min-height: 80vh;
  padding: calc(var(--topbar-h) + var(--nav-h) + 3rem) clamp(1rem, 3vw, 2.5rem) clamp(4rem, 8vw, 6rem);
  background: var(--black);
}
.cart-page > * { max-width: 1280px; margin-inline: auto; }
.cart-page__head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.cart-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.cart-page__list { list-style: none; border-top: 2px solid var(--white); }
.cart-page .cart-line { grid-template-columns: 120px minmax(0, 1fr) auto; padding: 1.4rem 0; }
.cart-page .cart-line__name { font-size: 1.4rem; }
.cart-page__empty { display: none; flex-direction: column; align-items: flex-start; gap: 1.4rem; font-size: 1.15rem; color: var(--muted); }
.cart-page.is-empty .cart-page__empty { display: flex; }
.cart-page.is-empty .cart-page__grid { display: none; }

.cart-summary {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--ink);
  border-top: 3px solid var(--red);
}
.cart-summary h2 {
  margin-bottom: 1.2rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  text-transform: uppercase;
}
.cart-summary__row,
.cart-summary__total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cart-summary__row { padding: .6rem 0; font-size: .95rem; color: #bdbdbd; border-bottom: 1px solid var(--line); }
.cart-summary__row b { font-weight: 600; color: var(--white); }
.cart-summary__row[hidden] { display: none; }
.cart-summary__total {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.cart-summary__total b { font-weight: 800; font-size: 2.2rem; letter-spacing: .02em; }
.cart-summary__note { font-size: .85rem; color: var(--muted); text-align: right; }
.cart-summary__cta { width: 100%; height: 54px; margin-top: 1.4rem; }
.cart-summary__cta:disabled { opacity: .45; cursor: not-allowed; }
.cart-summary__cta:disabled:hover { color: var(--white); }
.cart-summary__cta:disabled:hover::after { transform: skewX(var(--skew)) scaleX(0); }
.cart-summary__soon { margin-top: 1rem; font-size: .88rem; line-height: 1.55; color: var(--muted); }
.cart-summary__soon a,
.cart-summary__back { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.cart-summary__back { display: inline-block; margin-top: 1.2rem; font-size: .9rem; }
.cart-summary__soon a:hover,
.cart-summary__back:hover { color: var(--red); }

@media (max-width: 900px) {
  .cart-page__grid { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 560px) {
  .cart-page .cart-line { grid-template-columns: 84px minmax(0, 1fr); }
  .cart-line__side { grid-column: 2; align-items: flex-start; text-align: left; }
}

/* ==========================================================
   TABLA DE PRECIOS DE SERVICIOS (contratables)
   ========================================================== */
.plans {
  display: grid;
  /* --cols = columnas según los servicios de cada carrera (se fija en el HTML) */
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  max-width: calc(var(--cols, 3) * 420px);
  margin-inline: auto; /* centrada aunque tenga pocas columnas */
  gap: 1rem;
  align-items: stretch;
  list-style: none;
  padding-top: 1.2rem; /* aire para el destacado, que sube un poco */
  scroll-margin-top: calc(var(--nav-h) + 4rem);
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  background: var(--ink);
  border: 1px solid var(--line);
  isolation: isolate;
  transition: border-color .3s;
}
.plan:hover { border-color: rgba(198, 27, 24, .6); }

.plan.is-featured {
  margin-top: -1.2rem;
  border-color: transparent;
  background: var(--red-grad);
}
.plan.is-featured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(rgba(0, 0, 0, .1) 0 25%, transparent 0 50%) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(225deg, #000, transparent 60%);
  mask-image: linear-gradient(225deg, #000, transparent 60%);
}
.plan__badge {
  position: absolute;
  top: 0;
  left: 50%;
  padding: .35rem .9rem;
  background: var(--black);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  transform: translate(-50%, -50%) skewX(var(--skew));
}

.plan__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.plan__price {
  margin: 1.2rem 0 .6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  line-height: .9;
}
.plan__price b { font-size: clamp(3.6rem, 6vw, 4.6rem); }
.plan__price small { margin-left: .2rem; font-size: 1.8rem; color: var(--red); }
.plan.is-featured .plan__price small { color: rgba(255, 255, 255, .85); }
.plan__note { min-height: 3em; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.plan.is-featured .plan__note { color: rgba(255, 255, 255, .85); }

.plan__list {
  display: grid;
  gap: .7rem;
  margin: 1.4rem 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  list-style: none;
}
.plan.is-featured .plan__list { border-top-color: rgba(255, 255, 255, .25); }
.plan__list li { position: relative; padding-left: 1.7rem; font-size: .98rem; line-height: 1.4; }
/* check */
.plan__list li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .2em;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(45deg);
}
.plan.is-featured .plan__list li::before { border-color: var(--white); }

.plan__insurance {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-top: auto;
  padding: .8rem 0 1rem;
  font-size: .9rem;
  line-height: 1.4;
  color: #bdbdbd;
  cursor: pointer;
}
.plan.is-featured .plan__insurance { color: rgba(255, 255, 255, .9); }
.plan__insurance input { flex-shrink: 0; width: 17px; height: 17px; margin-top: .1rem; accent-color: var(--red); }
.plan.is-featured .plan__insurance input { accent-color: var(--black); }
.plan__insurance b { color: var(--white); white-space: nowrap; }
.plan__insurance + .plan__add { margin-top: 0; }

.plan__add,
.plan__ask { width: 100%; height: 52px; margin-top: auto; }
.plan__note { margin-bottom: 1.4rem; }
/* Precio a consultar */
.plan__price.is-ask b { font-size: clamp(2.2rem, 3.5vw, 2.8rem); color: var(--muted); }
.plan.is-featured .plan__price.is-ask b { color: rgba(255, 255, 255, .85); }
.plan.is-featured .plan__ask { border-color: rgba(255, 255, 255, .6); }
.plan__add.is-added::before { background: var(--white); }
.plan__add.is-added { color: var(--black); }
/* En el destacado, botón invertido (blanco) para que destaque sobre el rojo */
.plan.is-featured .plan__add { color: var(--black); }
.plan.is-featured .plan__add::before { background: var(--white); }
.plan.is-featured .plan__add::after { background: var(--black); }
.plan.is-featured .plan__add:hover { color: var(--white); }

@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; padding-top: 0; }
  .plan.is-featured { order: -1; margin-top: 1rem; }
}

/* Qué incluye cada servicio, dentro de cada carrera (mismo bloque que la home) */
.services--race {
  scroll-margin-top: var(--nav-h);
  border-top: 1px solid var(--line);
}

/* ==========================================================
   CLUB
   ========================================================== */
.club {
  padding: clamp(4rem, 8vw, 6rem) clamp(1rem, 3vw, 2.5rem);
  background: var(--black);
}
.club > * { max-width: 1280px; margin-inline: auto; }
.club__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.club__intro { max-width: 420px; font-size: 1.1rem; line-height: 1.6; color: #c4c4c4; }

.club__perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
}
.club-perk {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  background: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .3s, transform .4s var(--ease);
}
.club-perk:hover { border-color: rgba(198, 27, 24, .6); transform: translateY(-4px); }
.club-perk__big {
  margin-bottom: auto;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(3rem, 5vw, 4.4rem);
  line-height: .9;
  text-transform: uppercase;
  background: var(--red-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em;
}
.club-perk h3 {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
}
.club-perk p { margin-top: .5rem; font-size: .95rem; line-height: 1.5; color: var(--muted); }

/* La ventaja estrella, en rojo como los packs */
.club-perk.is-featured { border-color: transparent; background: var(--red-grad); }
.club-perk.is-featured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(rgba(0, 0, 0, .1) 0 25%, transparent 0 50%) 0 0 / 28px 28px;
  -webkit-mask-image: linear-gradient(225deg, #000, transparent 60%);
  mask-image: linear-gradient(225deg, #000, transparent 60%);
}
.club-perk.is-featured .club-perk__big { background: none; color: var(--white); }
.club-perk.is-featured p { color: rgba(255, 255, 255, .85); }

.club__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.club__cta p { max-width: 60ch; font-size: 1.15rem; line-height: 1.6; color: #c4c4c4; }

@media (max-width: 1000px) {
  .club__perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .club__perks { grid-template-columns: 1fr; }
  .club-perk { min-height: 0; }
}

/* ==========================================================
   ASISTENTE (chat guiado) — abajo a la derecha
   ========================================================== */
.asist {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.8rem);
  bottom: clamp(1rem, 2.5vw, 1.8rem);
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  font-family: var(--font-body);
}

/* Botón flotante */
.asist__launcher {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}
.asist__launcher-label {
  position: relative;
  padding: .55rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transition: opacity .3s, transform .3s var(--ease);
}
.asist__launcher-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--red-grad);
  box-shadow: 0 12px 30px rgba(198, 27, 24, .45);
  transition: transform .35s var(--ease);
}
.asist__launcher-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.asist__launcher:hover .asist__launcher-icon { transform: scale(1.08) rotate(-6deg); }
.asist.is-open .asist__launcher-label { opacity: 0; transform: translateX(10px); pointer-events: none; }

/* Panel */
.asist__panel {
  order: -1;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 2rem));
  height: min(580px, calc(100vh - 8rem));
  background: var(--ink);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .3s, transform .35s var(--ease);
}
.asist.is-open .asist__panel { opacity: 1; transform: none; }
.asist__panel[hidden] { display: none; }

.asist__head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.asist__head div { flex: 1; min-width: 0; }
.asist__head b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.asist__head small { display: block; font-size: .78rem; color: var(--muted); }
.asist__avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--steel);
  box-shadow: 0 0 0 2px var(--red);
}
.asist__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* punto verde de "en línea" */
.asist__avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3ecf6e;
  border: 2px solid var(--ink);
}
.asist__restart,
.asist__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color .25s;
}
.asist__restart svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.asist__close { font-size: 1.8rem; line-height: 1; }
.asist__restart:hover,
.asist__close:hover { color: var(--white); }

/* Conversación */
.asist__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.asist__msg {
  max-width: 85%;
  padding: .7rem .95rem;
  font-size: .95rem;
  line-height: 1.45;
  animation: asist-in .3s var(--ease) both;
}
.asist__msg--bot { align-self: flex-start; background: var(--steel); border-radius: 2px 14px 14px 14px; }
.asist__msg--user { align-self: flex-end; background: var(--red-grad); border-radius: 14px 2px 14px 14px; }
@keyframes asist-in { from { opacity: 0; transform: translateY(6px); } }

.asist__typing { display: inline-flex; gap: 4px; padding: .2rem 0; }
.asist__typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: asist-dot 1s infinite ease-in-out;
}
.asist__typing i:nth-child(2) { animation-delay: .15s; }
.asist__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asist-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Resumen final */
.asist__summary { display: grid; gap: .35rem; margin: .7rem 0 .6rem; list-style: none; }
.asist__summary li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.asist__summary span { color: var(--muted); }
.asist__summary b { font-weight: 600; text-align: right; }
.asist__legal { display: block; font-size: .75rem; line-height: 1.4; color: var(--muted); }
.asist__legal a { color: var(--white); text-decoration: underline; }

/* Respuestas rápidas */
.asist__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
  padding: 0 1.1rem;
}
.asist__chips:not(:empty) { padding-bottom: .9rem; }
.asist__chip {
  padding: .5rem .9rem;
  border: 1px solid rgba(198, 27, 24, .7);
  border-radius: 999px;
  background: none;
  color: var(--white);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  animation: asist-in .3s var(--ease) both;
  transition: background .25s, border-color .25s;
}
.asist__chip:hover { background: var(--red-grad); border-color: transparent; }

/* Campo de texto */
.asist__form {
  display: flex;
  gap: .5rem;
  padding: .8rem 1.1rem 1.1rem;
  border-top: 1px solid var(--line);
}
.asist__form[hidden] { display: none; }
.asist__input {
  flex: 1;
  min-width: 0;
  padding: .7rem .9rem;
  font: inherit;
  font-size: .95rem;
  color: var(--white);
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: 0;
}
.asist__input:focus { outline: none; border-color: var(--white); }
.asist__input.is-error { border-color: var(--red); }
.asist__input.is-error::placeholder { color: #ff8a87; }
.asist__send {
  display: grid;
  place-items: center;
  width: 44px;
  border: 0;
  background: var(--red-grad);
  color: var(--white);
  cursor: pointer;
}
.asist__send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 560px) {
  .asist__launcher-label { display: none; }
  .asist.is-open { inset: 0; padding: 0; gap: 0; }
  .asist.is-open .asist__panel { width: 100%; height: 100%; border: 0; }
  .asist.is-open .asist__launcher { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .asist__msg, .asist__chip { animation: none; }
}

/* Memoji dentro del chat: sin burbuja, con un pequeño rebote */
.asist__msg--sticker {
  align-self: flex-start;
  padding: 0;
  background: none;
  animation: asist-pop .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.asist__msg--sticker img { display: block; width: 110px; height: auto; }
@keyframes asist-pop { from { opacity: 0; transform: scale(.6) rotate(-8deg); } }

/* Selección múltiple en el asistente */
.asist__chip[aria-pressed="true"] { background: var(--red-grad); border-color: transparent; }
.asist__chip[aria-pressed="true"]::before { content: "✓ "; }
.asist__chip--go {
  flex-basis: 100%;
  margin-top: .3rem;
  border-radius: 0;
  border-color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.asist__chip--go:hover:not(:disabled) { background: var(--white); color: var(--black); }
.asist__chip--go:disabled { opacity: .35; cursor: not-allowed; }
.asist__chip--go:disabled:hover { background: none; border-color: var(--white); }
