/* ===== Base ===== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Selects uniformes (evita el truncado nativo en móvil) ===== */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 13px;
  padding-right: 32px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* ===== Menú móvil ===== */
.menu-toggle {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15);
  background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; flex-shrink: 0; padding: 0;
}
.menu-toggle span {
  display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.menu-toggle.abierto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.abierto span:nth-child(2) { opacity: 0; }
.menu-toggle.abierto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-movil {
  max-height: 0; overflow: hidden; background: #0b0f19;
  display: flex; flex-direction: column;
  transition: max-height .35s ease;
}
.menu-movil.abierto { max-height: 520px; border-top: 1px solid rgba(255,255,255,.08); }
.menu-movil-link {
  padding: 14px 24px; font-size: .9rem; font-weight: 600; color: #d1d5db;
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .2s ease, color .2s ease;
}
.menu-movil-link:hover, .menu-movil-link:active { background: rgba(255,255,255,.04); color: #fff; }
.menu-movil-secundario { color: #9ca3af; font-size: .82rem; }

/* ===== Ajustes generales para móvil ===== */
@media (max-width: 480px) {
  .compare-head, .compare-row { grid-template-columns: 1fr .85fr .85fr; padding-left: 10px; padding-right: 10px; }
  .compare-label-icono { width: 22px; height: 22px; }
  .compare-label { gap: 6px; }
  .compare-head-name { font-size: .62rem; }
  .compare-val { font-size: .78rem; }
  .moto-buscador-trigger { font-size: .78rem; padding: 8px 10px; }
  .moto-buscador-trigger-texto { max-width: 100%; }
  .donar-btn, .clear-btn { font-size: .74rem; padding: 8px 14px; }
}

/* ===== Franja superior con slider ===== */
.franja-slider {
  position: relative;
  height: 34px;
  overflow: hidden;
  text-align: center;
}
.franja-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .5s ease, transform .5s ease;
}
.franja-slide span { font-size: .9rem; }
.franja-slide.franja-activa { opacity: 1; transform: translateY(0); }
.franja-slide.franja-saliendo { opacity: 0; transform: translateY(-100%); }

/* ===== Footer ===== */
.footer-site { background: #030712; color: #9ca3af; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }

.footer-desc { font-size: .85rem; line-height: 1.65; margin-top: 12px; max-width: 340px; color: #6b7280; }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-titulo { color: #fff; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.footer-col a { font-size: .85rem; color: #9ca3af; text-decoration: none; transition: color .2s ease, transform .2s ease; width: fit-content; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); margin-top: 44px; padding-top: 22px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: .72rem; color: #6b7280;
}
.footer-disclaimer { max-width: 480px; }

/* ===== Encabezado con fondo animado (Publicar) ===== */
.encabezado-animado { position: relative; overflow: hidden; }

.encabezado-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9), transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.9), transparent 75%);
  pointer-events: none;
}

.encabezado-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .38;
  animation-timing-function: ease-in-out; animation-iteration-count: infinite;
}
.aurora-blob-1 {
  width: 440px; height: 440px; background: radial-gradient(circle, #dc2626, transparent 70%);
  top: -160px; left: -100px; animation: auroraFlotar1 17s infinite;
}
.aurora-blob-2 {
  width: 400px; height: 400px; background: radial-gradient(circle, #ef4444, transparent 70%);
  bottom: -180px; right: 8%; animation: auroraFlotar2 21s infinite;
}
.aurora-blob-3 {
  width: 320px; height: 320px; background: radial-gradient(circle, #334155, transparent 70%);
  top: 10%; right: -80px; animation: auroraFlotar3 19s infinite;
}

@keyframes auroraFlotar1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 50px) scale(1.15); }
}
@keyframes auroraFlotar2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.1); }
}
@keyframes auroraFlotar3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 60px) scale(1.2); }
}

/* ===== Navbar ===== */
.nav-bar { transition: box-shadow .3s ease; }
.nav-bar.scrolled { box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.nav-link { position: relative; text-decoration: none; transition: color .25s ease; }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: #dc2626; transition: width .3s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }

.icon-btn { transition: transform .3s ease, border-color .3s ease, color .3s ease; }
.icon-btn:hover { transform: translateY(-3px); border-color: #dc2626; color: #dc2626; }

.btn-primary { transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease, filter .3s ease; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 26px rgba(220,38,38,.35); filter: brightness(1.08); }
.btn-primary:active { transform: translateY(-1px) scale(.98); }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  background-image: url('Imagenes/Fondo.png');
  background-size: cover;
  background-position: center 30%;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(3,7,18,.94) 0%, rgba(3,7,18,.75) 42%, rgba(3,7,18,.35) 75%, rgba(3,7,18,.15) 100%),
              linear-gradient(0deg, rgba(3,7,18,.85) 0%, rgba(3,7,18,.1) 35%),
              radial-gradient(600px circle at 80% 20%, rgba(220,38,38,.12), transparent 60%);
  animation: glowPulse 8s ease-in-out infinite;
}

.hero-seguro-card {
  position: absolute; top: 112px; right: 48px; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.5); border-radius: 14px;
  padding: 14px 18px; max-width: 260px;
  box-shadow: 0 18px 34px rgba(0,0,0,.3);
  animation: heroSeguroFloat 4.5s ease-in-out infinite;
}
.hero-seguro-icono {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: #fff; border: 2px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.hero-seguro-icono img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.hero-seguro-titulo { font-size: .82rem; font-weight: 800; color: #0f172a; line-height: 1.3; }
.hero-seguro-sub { font-size: .68rem; color: #64748b; margin-top: 3px; line-height: 1.3; }

@keyframes heroSeguroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@media (max-width: 900px) {
  .hero-seguro-card { display: none; }
}
@keyframes glowPulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

.headline-accent { display: inline-block; position: relative; }
.headline-accent::after {
  content: ''; position: absolute; left: 0; bottom: 2px; width: 100%; height: 10px;
  background: rgba(220,38,38,.18); z-index: -1; transform: scaleX(0); transform-origin: left;
  animation: underlineGrow 1s .6s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes underlineGrow { to { transform: scaleX(1); } }

.headline-rotator { overflow: hidden; height: 1.15em; min-width: 14ch; vertical-align: top; }
.headline-rotate-item {
  position: absolute; opacity: 0; transform: translateY(55%);
  transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
}
.headline-rotate-item.headline-rotate-activa { opacity: 1; transform: translateY(0); }
.headline-rotate-item.headline-rotate-saliendo { opacity: 0; transform: translateY(-55%); }

.search-bar input { transition: box-shadow .3s ease; }
.search-bar:focus-within input { box-shadow: 0 0 0 3px rgba(220,38,38,.25); }

.hero-bike { transition: transform .3s ease; will-change: transform; }
.hero-bike-ring {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(239,68,68,.35);
  animation: ringSpin 16s linear infinite;
}
.hero-bike-ring::before {
  content: ''; position: absolute; inset: -1px; border-radius: 50%;
  border-top: 1px solid rgba(239,68,68,.7);
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== Comparador ===== */
.compare-card {
  position: relative; overflow: hidden;
  border: 1px solid #f1f5f9;
  box-shadow: 0 30px 60px -20px rgba(15,23,42,.25), 0 0 0 1px rgba(15,23,42,.03);
}
.compare-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, #0891b2, #dc2626 55%, #dc2626);
}

.compare-titulo-icono {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626;
  display: flex; align-items: center; justify-content: center;
}

.clear-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid #dc2626; background: #fff; color: #dc2626;
  font-size: .8rem; font-weight: 800; padding: 10px 18px; border-radius: 999px;
  cursor: pointer; box-shadow: 0 4px 12px rgba(220,38,38,.15);
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.clear-btn svg { transition: transform .3s ease; }
.clear-btn:hover {
  background: #dc2626; color: #fff; transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 22px rgba(220,38,38,.35);
}
.clear-btn:hover svg { transform: rotate(-12deg) scale(1.1); }
.clear-btn:active { transform: translateY(0) scale(.97); }

.donar-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid #d97706; background: #fffbeb; color: #b45309;
  font-size: .8rem; font-weight: 800; padding: 10px 18px; border-radius: 999px;
  cursor: pointer; box-shadow: 0 4px 12px rgba(217,119,6,.15);
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.donar-btn-icono { font-size: .95rem; }
.donar-btn:hover {
  background: #d97706; color: #fff; transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 22px rgba(217,119,6,.35);
}
.donar-btn:active { transform: translateY(0) scale(.97); }

/* ===== Buscador de motos (comparador) ===== */
.moto-buscador { position: relative; margin-bottom: 14px; }

.moto-buscador-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .85rem; font-weight: 700; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 9px 12px; background: #fff; cursor: pointer; color: #0f172a; font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.moto-buscador-trigger:hover, .moto-buscador-trigger.abierto { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.moto-buscador-trigger svg { flex-shrink: 0; color: #9ca3af; transition: transform .2s ease; }
.moto-buscador-trigger.abierto svg { transform: rotate(180deg); }
.moto-buscador-trigger-texto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

.moto-buscador-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 16px 32px rgba(15,23,42,.16);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  overflow: hidden;
}
.moto-buscador-panel.abierto { opacity: 1; visibility: visible; transform: translateY(0); }

.moto-buscador-input-wrap { position: relative; padding: 8px; border-bottom: 1px solid #f1f5f9; }
.moto-buscador-input-wrap svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.moto-buscador-input {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px 8px 30px;
  font-size: .8rem; font-family: inherit; color: #0f172a;
}
.moto-buscador-input:focus { outline: none; border-color: #dc2626; }

.moto-buscador-lista { max-height: 190px; overflow-y: auto; padding: 6px; }
.moto-buscador-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px;
  font-size: .82rem; font-weight: 600; color: #374151; background: none; border: none; cursor: pointer;
  font-family: inherit; transition: background .15s ease, color .15s ease;
}
.moto-buscador-item:hover { background: #fef2f2; color: #dc2626; }
.moto-buscador-item.activo { background: #fee2e2; color: #dc2626; }
.moto-buscador-vacio { padding: 14px; font-size: .78rem; color: #9ca3af; text-align: center; }

.moto-pick {
  border: 1px solid #eef0f3; background: #fff; overflow: hidden; position: relative;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.moto-pick::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 999px 999px 0 0;
}
.moto-pick-a::before { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
.moto-pick-b::before { background: linear-gradient(90deg, #dc2626, #f87171); }
.moto-pick:hover { border-color: rgba(220,38,38,.3); box-shadow: 0 18px 32px rgba(15,23,42,.1); transform: translateY(-4px); }
.moto-thumb { transition: transform .4s cubic-bezier(.2,.8,.2,1); overflow: hidden; will-change: transform; }
.moto-thumb-foto { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.moto-pick:hover .moto-thumb { transform: scale(1.06) rotate(-2deg); }
.moto-thumb.swap { animation: swapPop .3s ease-out; }
@keyframes swapPop { 0% { opacity: 0; } 100% { opacity: 1; } }

.vs-badge {
  background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff;
  border: 4px solid #fff; animation: vsPulse 2.6s ease-in-out infinite;
}
@keyframes vsPulse {
  0%,100% { box-shadow: 0 8px 20px rgba(220,38,38,.25); }
  50% { box-shadow: 0 10px 30px rgba(220,38,38,.5); }
}

.compare-table { border: 1px solid #0f172a; border-radius: 14px; overflow: hidden; }

.compare-head {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; align-items: center;
  padding: 14px; background: linear-gradient(135deg, #0f172a, #1e293b); border-bottom: none;
}
.compare-head-name {
  display: flex; align-items: center; justify-content: flex-end;
  min-height: 2.4em; line-height: 1.2;
  text-align: right; font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  color: #fff; text-transform: uppercase; padding-right: 2px;
}

.compare-row {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; align-items: center;
  padding: 13px 14px; font-size: .86rem; border-bottom: 1px solid #f1f5f9;
  transition: background .25s ease;
}
.compare-row:last-child { border-bottom: none; }
.compare-row:hover { background: #fef2f2; }
.compare-row:nth-child(even) { background: #fafbfc; }
.compare-row:nth-child(even):hover { background: #fef2f2; }

.compare-label { display: flex; align-items: center; gap: 9px; color: #475569; font-weight: 700; font-size: .8rem; }
.compare-label-icono {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: #f1f5f9; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s ease, color .25s ease;
}
.compare-row:hover .compare-label-icono { background: #fee2e2; color: #dc2626; }

.compare-val {
  text-align: right; font-weight: 700; color: #0f172a;
  transition: color .3s ease, transform .3s ease;
}
.compare-val.updated { animation: statFlash .5s ease; }
@keyframes statFlash { 0% { transform: scale(1.15); } 100% { transform: scale(1); } }

.compare-val.mejor { color: #dc2626; font-weight: 800; }
.compare-val.mejor::after {
  content: '●'; font-size: .5rem; vertical-align: middle; margin-left: 5px; color: #dc2626;
}

/* ===== Dashboard: comparación completa ===== */
.dash-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(3,7,18,.82);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 16px; overflow-y: auto;
  animation: modalFadeDash .25s ease;
}
.dash-overlay.hidden { display: none; }
@keyframes modalFadeDash { from { opacity: 0; } to { opacity: 1; } }

.dash-box {
  background: #f8fafc; border-radius: 20px; max-width: 980px; width: 100%;
  margin: auto; position: relative; padding: 28px 24px 34px;
  animation: modalPopDash .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes modalPopDash { from { opacity: 0; transform: scale(.96) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.dash-cerrar {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(17,24,39,.08);
  color: #0f172a; font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.dash-cerrar:hover { background: #dc2626; color: #fff; transform: rotate(90deg); }

.dash-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
  background: linear-gradient(160deg, #0b1220, #1e293b 55%, #0b1220); border-radius: 20px;
  padding: 30px 24px; margin-bottom: 22px; position: relative; overflow: hidden;
}
.dash-header::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background:
    radial-gradient(circle at 12% 15%, rgba(8,145,178,.28), transparent 42%),
    radial-gradient(circle at 88% 85%, rgba(217,119,6,.28), transparent 42%);
}
.dash-header-moto { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; position: relative; z-index: 1; }
.dash-header-etiqueta {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.5);
}
.dash-header-thumb {
  width: 112px; height: 112px; border-radius: 20px; padding: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1);
}
.dash-header-a .dash-header-thumb { background: linear-gradient(150deg, #ecfeff, #cffafe); }
.dash-header-b .dash-header-thumb { background: linear-gradient(150deg, #fffbeb, #fde68a); }
.dash-header-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dash-header-nombre { color: #fff; font-weight: 800; font-size: .95rem; line-height: 1.3; }
.dash-header-precio {
  color: #fff; font-weight: 800; font-size: .88rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
  padding: 5px 14px; border-radius: 999px;
}
.dash-header-vs {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; position: relative; z-index: 1;
  background: linear-gradient(135deg, #ef4444, #991b1b); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem;
  border: 3px solid rgba(255,255,255,.18); animation: vsPulse 2.6s ease-in-out infinite;
}

.dash-secciones { display: flex; flex-direction: column; gap: 20px; margin-bottom: 22px; }
.dash-seccion { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 8px 20px; }
.dash-seccion-titulo {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: #dc2626; padding: 14px 0 10px;
}

.dash-row {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; align-items: center;
  padding: 13px 0; font-size: .86rem; border-top: 1px solid #f1f5f9;
}
.dash-seccion .dash-row:first-of-type { border-top: none; }
.dash-label { color: #475569; font-weight: 700; }
.dash-val { text-align: right; font-weight: 700; color: #0f172a; }
.dash-val.mejor { color: #dc2626; font-weight: 800; }
.dash-val.mejor::after { content: '●'; font-size: .5rem; vertical-align: middle; margin-left: 5px; color: #dc2626; }

.dash-barfila { padding: 16px 0; border-top: 1px solid #f1f5f9; }
.dash-seccion .dash-barfila:first-child { border-top: none; }
.dash-barfila-label { font-size: .85rem; font-weight: 700; color: #475569; margin-bottom: 12px; }
.dash-barfila-linea { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dash-barfila-linea:last-child { margin-bottom: 0; }
.dash-barfila-tag {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--dash-tag-ring, transparent);
}
.dash-barfila-tag-a { background: #0891b2; --dash-tag-ring: rgba(8,145,178,.15); }
.dash-barfila-tag-b { background: #d97706; --dash-tag-ring: rgba(217,119,6,.15); }
.dash-barfila-nombre {
  font-size: .74rem; font-weight: 700; color: #64748b;
  width: 64px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-barfila-track { flex: 1; height: 11px; border-radius: 999px; background: #f1f5f9; overflow: hidden; min-width: 0; }
.dash-barfila-fill { height: 100%; border-radius: 0 999px 999px 0; transition: width .5s ease; }
.dash-barfila-fill-a { background: linear-gradient(90deg, #0891b2, #22d3ee); }
.dash-barfila-fill-b { background: linear-gradient(90deg, #d97706, #fbbf24); }
.dash-barfila-linea .dash-val { min-width: 72px; text-align: right; font-size: .85rem; flex-shrink: 0; }

.dash-puntos { display: grid; gap: 16px; margin-bottom: 22px; }
@media (min-width: 700px) { .dash-puntos { grid-template-columns: 1fr 1fr; } }
.dash-puntos-col { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 18px; }
.dash-puntos-nombre { font-weight: 800; font-size: .88rem; color: #0f172a; margin-bottom: 10px; }
.dash-puntos-titulo { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 6px; }
.dash-puntos-titulo-pos { color: #16a34a; }
.dash-puntos-titulo-neg { color: #dc2626; }
.dash-puntos-lista { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: #374151; padding-left: 18px; }
.dash-puntos-lista li { line-height: 1.4; }
.dash-puntos-vacio { color: #9ca3af; list-style: none; margin-left: -18px; }

.dash-videos { display: grid; gap: 16px; }
.dash-videos.hidden { display: none; }
@media (min-width: 700px) { .dash-videos { grid-template-columns: 1fr 1fr; } }
.dash-video-col { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 18px; }
.dash-video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #0f172a; }
.dash-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dash-video-vacio { color: #9ca3af; font-size: .82rem; text-align: center; padding: 24px 0; }

@media (max-width: 640px) {
  .dash-overlay { padding: 16px 8px; }
  .dash-box { padding: 22px 14px 26px; }
  .dash-header { padding: 20px 14px; gap: 10px; }
  .dash-seccion { padding: 6px 12px; }
  .dash-row { grid-template-columns: 1fr .8fr .8fr; font-size: .76rem; }
  .dash-barfila-linea .dash-val { min-width: 54px; font-size: .74rem; }
  .dash-barfila-nombre { width: 44px; font-size: .66rem; }
  .dash-header-thumb { width: 76px; height: 76px; border-radius: 16px; padding: 6px; }
  .dash-header-nombre { font-size: .76rem; }
  .dash-header-precio { font-size: .76rem; padding: 4px 10px; }
  .dash-header-vs { width: 40px; height: 40px; font-size: .72rem; }
}

/* ===== Fichas: datos del mercado ===== */
.ranking-card {
  background: #fff; border: 1px solid #f1f5f9; border-radius: 16px;
  overflow: hidden; box-shadow: 0 10px 24px rgba(15,23,42,.06);
  transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column;
}
.ranking-card:hover { transform: translateY(-4px); box-shadow: 0 20px 36px rgba(15,23,42,.12); }

.ranking-card-header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: #fff; }
.ranking-card-header-robo { background: linear-gradient(135deg, #dc2626, #991b1b); }
.ranking-card-header-vendidas { background: linear-gradient(135deg, #16a34a, #15803d); }
.ranking-card-header-reputacion { background: linear-gradient(135deg, #0f172a, #1e293b); }

.ranking-card-icono {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ranking-card-titulo { font-weight: 800; font-size: .95rem; }
.ranking-card-subtitulo { font-size: .72rem; opacity: .85; margin-top: 1px; }

.ranking-card-nota {
  font-size: .72rem; color: #6b7280; padding: 12px 20px 18px; margin-top: auto;
  border-top: 1px solid #f8fafc; line-height: 1.5;
}

/* ===== Barras estadísticas (robadas / vendidas) ===== */
.rank-chart { list-style: none; margin: 0; padding: 10px 20px 4px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

.rank-bar-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.rank-bar-pos {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 800; color: #fff;
}
.rank-pos-red { background: #dc2626; }
.rank-pos-green { background: #16a34a; }

.rank-bar-textos { flex: 1; min-width: 0; }
.rank-bar-nombre { font-weight: 700; font-size: .82rem; color: #0f172a; }
.rank-bar-detalle { font-size: .71rem; color: #6b7280; margin-top: 1px; line-height: 1.4; }
.rank-bar-valor {
  font-size: .78rem; font-weight: 800; color: #0f172a; flex-shrink: 0;
  font-variant-numeric: tabular-nums; margin-top: 1px;
}

.rank-bar-track {
  height: 8px; background: #f1f5f9; border-radius: 0 4px 4px 0; overflow: hidden;
  margin-left: 32px;
}
.rank-bar-fill {
  display: block; height: 100%; border-radius: 0 4px 4px 0;
  width: 0%; transition: width 1.1s cubic-bezier(.16,.8,.2,1);
}
.rank-bar-row:nth-child(1) .rank-bar-fill { transition-delay: .05s; }
.rank-bar-row:nth-child(2) .rank-bar-fill { transition-delay: .16s; }
.rank-bar-row:nth-child(3) .rank-bar-fill { transition-delay: .27s; }
.rank-bar-row:nth-child(4) .rank-bar-fill { transition-delay: .38s; }
.rank-bar-row:nth-child(5) .rank-bar-fill { transition-delay: .49s; }

.rank-chart-nota { font-size: .66rem; color: #9ca3af; padding: 0 20px 8px; font-style: italic; }

/* ===== Reputación: detalle profesional (sin datos numéricos) ===== */
.reputacion-grid { padding: 10px 20px 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.reputacion-item { display: flex; align-items: center; gap: 12px; }
.reputacion-icono {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: #f1f5f9; color: #1e293b;
  display: flex; align-items: center; justify-content: center;
}
.reputacion-marca { font-weight: 800; font-size: .84rem; color: #0f172a; }
.reputacion-tag { font-size: .72rem; color: #6b7280; margin-top: 1px; }

/* ===== Fuentes ===== */
.fuentes-panel {
  margin-top: 28px; padding: 18px 20px; border: 1px solid #f1f5f9; border-radius: 14px; background: #fafbfc;
}
.fuentes-titulo {
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: #9ca3af; margin-bottom: 12px;
}
.fuentes-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.fuentes-lista a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .73rem; font-weight: 600; color: #475569;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; padding: 7px 13px;
  text-decoration: none; transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.fuentes-lista a:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
.fuentes-lista a svg { flex-shrink: 0; opacity: .7; }
.fuentes-nota { font-size: .68rem; color: #9ca3af; margin-top: 14px; line-height: 1.5; }

/* ===== Conclusión del VS ===== */
.conclusion-vs {
  margin-top: 24px; display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  border: 1px solid #fecaca; border-radius: 14px; padding: 18px 20px;
  animation: conclusionIn .4s cubic-bezier(.2,.8,.2,1);
}
.conclusion-vs.hidden { display: none; }
@keyframes conclusionIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.conclusion-vs-icono {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #dc2626, #f87171); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.conclusion-vs-titulo {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: #dc2626; margin-bottom: 4px;
}
.conclusion-vs-texto { font-size: .87rem; color: #374151; line-height: 1.6; }
.conclusion-vs-texto strong { color: #0f172a; }

.conclusion-vs-inline {
  margin-top: 0; padding: 14px 16px;
  align-items: center; overflow-y: auto;
}
.conclusion-vs-inline .conclusion-vs-icono { width: 30px; height: 30px; }
.conclusion-vs-inline .conclusion-vs-titulo { font-size: .62rem; margin-bottom: 3px; }
.conclusion-vs-inline .conclusion-vs-texto { font-size: .74rem; line-height: 1.45; }

.ver-ficha-btn, .ver-comp-btn { transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease, box-shadow .25s ease; }
.ver-ficha-btn:hover, .ver-comp-btn:hover { background: #0f172a; color: #fff; border-color: #0f172a; transform: translateY(-2px); }

.ver-ficha-btn {
  background: #fff;
  color: #dc2626 !important;
  border-color: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(220,38,38,.12);
}
.ver-ficha-btn:hover {
  background: #dc2626;
  color: #fff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 8px 18px rgba(220,38,38,.3);
}

.ver-ficha-btn-deshabilitado {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  color: #94a3b8 !important;
  border-color: #e2e8f0 !important;
  box-shadow: none;
}
.ver-ficha-btn-deshabilitado:hover { background: #fff; color: #94a3b8 !important; }

.ver-comp-btn {
  background: #dc2626;
  color: #fff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 6px 16px rgba(220,38,38,.25);
}
.ver-comp-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c !important;
  box-shadow: 0 10px 22px rgba(220,38,38,.35);
}

/* ===== Carousels ===== */
.carousel-track {
  scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn { transition: background .25s ease, color .25s ease, transform .2s ease, border-color .25s ease; }
.carousel-btn:hover { background: #dc2626; color: #fff; border-color: #dc2626; transform: scale(1.08); }
.carousel-btn:active { transform: scale(.94); }

.brand-card { transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease, border-color .3s ease; cursor: pointer; }
.brand-card:hover { transform: translateY(-5px); box-shadow: 0 14px 26px rgba(15,23,42,.1); border-color: rgba(220,38,38,.3); }

.moto-card { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease; }
.moto-card:hover { transform: translateY(-6px); box-shadow: 0 20px 36px rgba(15,23,42,.12); border-color: rgba(220,38,38,.25); }
.moto-card-thumb { transition: transform .5s ease; }
.moto-card:hover .moto-card-thumb { transform: scale(1.08); }

/* ===== Stats band ===== */
.stats-band { position: relative; overflow: hidden; }
.stats-band::before {
  content: ''; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(220,38,38,.25), transparent 70%);
}

/* ===== CTA cards ===== */
.cta-card { transition: transform .35s ease, box-shadow .35s ease; }
.cta-card:hover { transform: translateY(-5px); box-shadow: 0 20px 36px rgba(15,23,42,.12); }
.cta-icon { transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.cta-card:hover .cta-icon { transform: scale(1.15) rotate(-6deg); }

.link-underline { position: relative; text-decoration: none; }
.link-underline::after {
  content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }
