/* =========================================================================
   CS RACING · Portal de catálogo — Design system "Cinemático Premium"
   Look editorial oscuro de catálogo de producto de gama alta.
   Mobile-first · CSS vanilla · v1
   ========================================================================= */

/* ---------- Variables ---------- */
:root {
  --accent:       #ff2a2a;
  --accent-soft:  #ff5555;
  --veh-auto:     #57d131;
  --veh-tracto:   #ffb020;
  --veh-moto:     #3e8bff;

  --bg:    #0a0b0c;
  --bg-2:  #121315;
  --bg-3:  #1a1b1d;
  --line:  #25272a;

  --text:    #f1f1f1;
  --muted:   #8a8d91;
  --muted-2: #5a5d61;

  --ok:   #3fdb4c;
  --warn: #ffb020;
  --err:  #ff2a2a;

  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-sans:    'Manrope', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad-x: clamp(1rem, 4vw, 3rem);
  --maxw: 1300px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
b, strong { font-weight: 600; }
body.modal-open { overflow: hidden; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Microtexto mono (firma del sistema) ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--accent);
  font-weight: 600;
}
.kicker::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* =========================================================================
   HEADER — fijo, translúcido
   ========================================================================= */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), rgba(0,0,0,.25));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .3s var(--ease);
}
.topbar.is-scrolled { background: rgba(10,11,12,.88); }
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .65rem var(--pad-x);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; }
.brand__logo { height: 30px; width: auto; }
.brand__divider { width: 1px; height: 22px; background: rgba(255,255,255,.18); }
.brand__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--muted);
  white-space: nowrap;
}
.topbar__nav { display: none; }
.topbar__actions { display: flex; align-items: center; gap: .7rem; margin-left: auto; }

.search {
  display: none;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(18,19,21,.7);
  padding: .35rem .6rem;
}
.search button {
  background: none; border: 0; color: var(--muted);
  display: grid; place-items: center;
}
.search button svg { width: 15px; height: 15px; }
.search input {
  background: none; border: 0; outline: 0;
  color: var(--text);
  font-size: .85rem;
  width: 150px;
}
.search input::placeholder { color: var(--muted-2); }

.topbar__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: .82rem;
  padding: .55rem .95rem;
  border-radius: 4px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.topbar__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,42,42,.35); }
.topbar__cta-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}
.badge {
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}
.topbar__user {
  display: none;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
}
.topbar__user a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.topbar__user a:hover { color: var(--accent); }
@media (min-width: 700px) { .topbar__user { display: inline-flex; } }

/* Nav desktop */
@media (min-width: 900px) {
  .topbar__nav { display: flex; align-items: center; gap: 1.4rem; margin: 0 auto; }
  .topbar__nav a {
    position: relative;
    font-size: .85rem;
    color: var(--text);
    padding: .3rem 0;
  }
  .topbar__nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
  }
  .topbar__nav a:hover::after { transform: scaleX(1); }
  .nav-veh--auto:hover   { color: var(--veh-auto); }
  .nav-veh--auto::after  { background: var(--veh-auto) !important; }
  .nav-veh--tracto:hover { color: var(--veh-tracto); }
  .nav-veh--tracto::after{ background: var(--veh-tracto) !important; }
  .nav-veh--moto:hover   { color: var(--veh-moto); }
  .nav-veh--moto::after  { background: var(--veh-moto) !important; }
  .search { display: flex; }
}

/* Compensación del header fijo en páginas interiores */
.is-inner .main { padding-top: 76px; }

/* =========================================================================
   HERO cinemático (landing)
   ========================================================================= */
.hero-cine {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
@media (min-width: 700px) {
  .hero-cine {
    min-height: 100vh;
    min-height: 100svh;
  }
}
.hero-cine__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: kenburns 20s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.05) translate(0, 0); }
  to   { transform: scale(1.15) translate(-1.5%, 1%); }
}
.hero-cine__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,11,12,.45) 0%, rgba(10,11,12,.55) 55%, var(--bg) 100%);
}
.hero-cine__grain {
  position: absolute;
  inset: 0;
  opacity: .08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-cine__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6.5rem var(--pad-x) 0;
}
@media (min-width: 700px) {
  .hero-cine__content { padding-top: 8rem; }
}
.hero-cine__meta {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.hero-cine__meta::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
}
.hero-cine h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 10vw, 9rem);
  line-height: .92;
  letter-spacing: -.02em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.hero-cine h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: word-in .8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
.hero-cine h1 .word--accent { color: var(--accent); }
@keyframes word-in {
  to { opacity: 1; transform: translateY(0); }
}
.hero-cine__sub {
  max-width: 580px;
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1.6rem;
}
.hero-cine__ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.4rem; }
@media (min-width: 700px) {
  .hero-cine__sub { font-size: 1.02rem; margin-bottom: 2rem; }
  .hero-cine__ctas { margin-bottom: 4rem; }
}

/* Stats hairline al pie del hero */
.hero-cine__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.hero-cine__stat {
  background: var(--bg);
  padding: 1.4rem 1rem;
}
.hero-cine__stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1;
  margin-bottom: .35rem;
}
.hero-cine__stat span {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--muted);
}
@media (min-width: 700px) {
  .hero-cine__stats { grid-template-columns: repeat(4, 1fr); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: 2rem;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
}
.scroll-hint span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}
.scroll-hint::after {
  content: "";
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--line), var(--line));
  position: relative;
  overflow: hidden;
}
.scroll-hint i {
  position: absolute;
  bottom: 0;
  width: 1px; height: 50px;
  overflow: hidden;
}
.scroll-hint i::after {
  content: "";
  position: absolute;
  top: -12px; left: 0;
  width: 1px; height: 12px;
  background: var(--accent);
  animation: scroll-pulse 2s var(--ease) infinite;
}
@keyframes scroll-pulse {
  to { top: 50px; }
}
@media (min-width: 900px) { .scroll-hint { display: flex; } }

/* =========================================================================
   MARQUEE
   ========================================================================= */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: .9rem 0;
  background: var(--bg);
}
.marquee__track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.marquee__track span::after {
  content: "●";
  font-size: .55rem;
  color: var(--accent);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* =========================================================================
   SECCIONES
   ========================================================================= */
.section {
  padding: clamp(4.5rem, 9vw, 8rem) var(--pad-x);
  border-top: 1px solid var(--line);
}
.section--alt { background: var(--bg-2); }
.section__inner { max-width: var(--maxw); margin: 0 auto; }
.section__head { margin-bottom: clamp(2.2rem, 5vw, 3.8rem); }
.section__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin-top: .8rem;
}
.section__head h2 em { font-style: normal; color: var(--accent); }
.section__head p { max-width: 560px; color: var(--muted); margin-top: 1rem; }

/* ---------- Cards de vehículo (eje de entrada) ---------- */
.veh-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.veh-card {
  --veh: var(--accent);
  position: relative;
  background: var(--bg);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
}
.veh-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .6s var(--ease), filter .6s var(--ease);
  filter: saturate(.75) brightness(.75);
}
.veh-card:hover .veh-card__bg { transform: scale(1.05); filter: saturate(1) brightness(.9); }
.veh-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,11,12,.92) 0%, rgba(10,11,12,.25) 55%, rgba(10,11,12,.15) 100%);
}
.veh-card__body {
  position: relative;
  z-index: 2;
  padding: 1.6rem;
  width: 100%;
}
.veh-card__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--veh);
  display: block;
  margin-bottom: .5rem;
}
.veh-card__body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.veh-card__body p { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; max-width: 320px; }
.veh-card__go {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--veh);
}
.veh-card__go svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.veh-card:hover .veh-card__go svg { transform: translateX(4px); }
.veh-card__line {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--veh);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
  z-index: 3;
}
.veh-card:hover .veh-card__line { transform: scaleX(1); }
.veh-card--auto   { --veh: var(--veh-auto); }
.veh-card--tracto { --veh: var(--veh-tracto); }
.veh-card--moto   { --veh: var(--veh-moto); }
@media (min-width: 900px) {
  .veh-grid { grid-template-columns: repeat(3, 1fr); }
  .veh-card { min-height: 420px; }
}

/* ---------- Grilla de familias (retícula editorial) ---------- */
.fam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.fam-card {
  position: relative;
  background: var(--bg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: background .3s var(--ease);
  overflow: hidden;
}
.fam-card:hover { background: var(--bg-3); }
.fam-card__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--accent);
}
.fam-card h3 { font-size: 1.05rem; font-weight: 600; }
.fam-card p { color: var(--muted); font-size: .86rem; flex: 1; }
.fam-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
}
.fam-card__count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.fam-card__arrow { color: var(--muted); transition: transform .3s var(--ease), color .3s var(--ease); }
.fam-card:hover .fam-card__arrow { transform: translateX(4px); color: var(--accent); }
.fam-card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.fam-card:hover::after { transform: scaleX(1); }

/* ---------- Showcase producto (2 col, anillos) ---------- */
.showcase {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.showcase__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
}
.showcase__visual img {
  position: relative;
  z-index: 2;
  max-height: 380px;
  width: auto;
  filter: drop-shadow(0 30px 60px rgba(255,42,42,.15));
}
.showcase__ring, .showcase__ring--dash {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.showcase__ring {
  width: min(78%, 420px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
}
.showcase__ring--dash {
  width: min(92%, 500px);
  aspect-ratio: 1;
  border: 1px dashed rgba(255,42,42,.15);
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.showcase__specs { border-top: 1px solid var(--line); margin-top: 1.6rem; }
.showcase__spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}
.showcase__spec span { color: var(--muted); font-size: .9rem; }
.showcase__spec b { font-family: var(--font-mono); font-size: .8rem; font-weight: 600; letter-spacing: .05em; }
@media (min-width: 900px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

/* Banda fotográfica intermedia */
.photoband {
  position: relative;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
}
@supports (-webkit-touch-callout: none) {
  .photoband { background-attachment: scroll; }
}
.photoband::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,11,12,.92), rgba(10,11,12,.35));
}
.photoband__content {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem var(--pad-x);
  width: 100%;
}
.photoband h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: .95;
  text-transform: uppercase;
  max-width: 560px;
}
.photoband h2 em { font-style: normal; color: var(--accent); }
.photoband p { color: var(--muted); max-width: 460px; margin: 1rem 0 1.6rem; }

/* =========================================================================
   BOTONES
   ========================================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-weight: 600;
  font-size: .9rem;
  padding: .8rem 1.5rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255,42,42,.35);
  background: var(--accent-soft);
}
.btn-primary:disabled { opacity: .5; transform: none; box-shadow: none; cursor: default; }
.btn-primary svg { width: 16px; height: 16px; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px;
  font-weight: 600;
  font-size: .9rem;
  padding: .8rem 1.5rem;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.btn-secondary:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.04); }

/* =========================================================================
   CATÁLOGO — toolbar / chips / grid
   ========================================================================= */
.cat-hero {
  padding: 2.2rem var(--pad-x) 0;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.cat-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: .95;
  text-transform: uppercase;
  margin-top: .7rem;
}
.cat-hero h1 em { font-style: normal; color: var(--accent); }
.cat-hero__sub { color: var(--muted); max-width: 560px; margin-top: .6rem; font-size: .95rem; }

.cat-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) 4rem;
  width: 100%;
}

/* Selector de vehículo (catálogo) */
.veh-switch {
  display: flex;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1.6rem;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.veh-switch a {
  --veh: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg);
  padding: .65rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.veh-switch a:hover { background: var(--bg-3); color: var(--text); }
.veh-switch a.is-active { background: var(--bg-3); color: var(--veh); box-shadow: inset 0 -2px 0 var(--veh); }
.veh-switch a svg { width: 17px; height: 17px; }
.veh-switch a[data-veh="auto"]   { --veh: var(--veh-auto); }
.veh-switch a[data-veh="tracto"] { --veh: var(--veh-tracto); }
.veh-switch a[data-veh="moto"]   { --veh: var(--veh-moto); }

/* CTA asistente */
.toolbar__assist {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0 0;
  color: var(--text);
  text-align: left;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.toolbar__assist:hover { border-color: rgba(255,42,42,.5); background: var(--bg-3); }
.toolbar__assist__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
}
.toolbar__assist__icon svg { width: 20px; height: 20px; }
.toolbar__assist__text { flex: 1; min-width: 0; }
.toolbar__assist__text b { display: block; font-size: .95rem; font-weight: 600; }
.toolbar__assist__text small { color: var(--muted); font-size: .8rem; }
.toolbar__assist__cta { display: flex; align-items: center; gap: .5rem; }
.toolbar__assist__cta .badge { background: var(--accent); color: #fff; }
.toolbar__assist__arrow { color: var(--accent); font-size: 1.1rem; transition: transform .3s var(--ease); }
.toolbar__assist:hover .toolbar__assist__arrow { transform: translateX(4px); }

/* Chips aplicados */
.appliedbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
}
.appliedbar__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.applied-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .8rem;
  font-size: .8rem;
  color: var(--text);
  transition: border-color .25s var(--ease);
}
.applied-chip span { color: var(--accent); font-weight: 600; }
.applied-chip:hover { border-color: var(--accent); }
.appliedbar__clear {
  font-size: .8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.appliedbar__clear:hover { color: var(--text); }

/* Barra de resultados */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.4rem 0 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.results-bar__count { font-size: .9rem; color: var(--muted); }
.results-bar__count b { color: var(--text); font-family: var(--font-mono); font-size: .85rem; }
.sort-select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-size: .82rem;
  padding: .5rem .8rem;
  outline: 0;
}

/* Grid de productos — retícula editorial hairline */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: background .3s var(--ease);
  overflow: hidden;
}
.card:hover { background: var(--bg-2); }
.card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
  z-index: 3;
}
.card:hover::after { transform: scaleX(1); }
.card__compare {
  position: absolute;
  top: .6rem; right: .6rem;
  z-index: 4;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: rgba(18,19,21,.85);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.card__compare svg { width: 15px; height: 15px; }
.card__compare:hover { color: var(--text); border-color: var(--muted); }
.card__compare.is-active { color: var(--accent); border-color: var(--accent); }
.card__img {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #fff;
  overflow: hidden;
}
.card__img img {
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
  transition: transform .5s var(--ease);
}
.card:hover .card__img img { transform: scale(1.06); }
.card__body {
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  flex: 1;
}
.card__sku {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--accent);
}
.card__name {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.card__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.card__tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.card__tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .15rem .4rem;
}
.card__tag--volt { color: var(--veh-tracto); border-color: rgba(255,176,32,.35); }
.card__price {
  margin-top: auto;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .95rem;
}
.card__price small { color: var(--muted-2); font-size: .68rem; font-weight: 400; }
.card__price--consultar { color: var(--muted); font-size: .8rem; }
.card__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  padding: .55rem;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.card__add svg { width: 14px; height: 14px; }
.card__add:hover { background: var(--accent); border-color: var(--accent); }
.card__add.is-added { background: var(--ok); border-color: var(--ok); color: #08210c; }

/* Paginación */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: 2rem 0 0;
}
.pager a, .pager .is-active, .pager .gap {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: .8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 .5rem;
}
.pager a { color: var(--muted); transition: border-color .25s var(--ease), color .25s var(--ease); }
.pager a:hover { color: var(--text); border-color: var(--muted); }
.pager .is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .gap { border: 0; color: var(--muted-2); }

/* Vacío */
.empty {
  text-align: center;
  padding: 4rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 4px;
  margin-top: 1.5rem;
}
.empty__icon { font-size: 2rem; color: var(--muted-2); margin-bottom: .8rem; }
.empty h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; text-transform: uppercase; margin-bottom: .4rem; }
.empty p { color: var(--muted); margin-bottom: 1.4rem; }

/* =========================================================================
   MODAL asistente (2 pasos)
   ========================================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal__panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: 92vh;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(24px);
  transition: transform .3s var(--ease);
}
.modal.is-open .modal__panel { transform: translateY(0); }
@media (min-width: 700px) {
  .modal { align-items: center; padding: 2rem; }
  .modal__panel { max-width: 860px; border-radius: 8px; max-height: 86vh; }
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.4rem 1rem;
  border-bottom: 1px solid var(--line);
}
.modal__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.modal__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1;
  text-transform: uppercase;
  margin-top: .3rem;
}
.modal__head h2 em { font-style: normal; color: var(--accent); }
.modal__head p { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.modal__close {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.modal__close:hover { color: var(--text); border-color: var(--muted); }
.modal__close svg { width: 16px; height: 16px; }
.modal__body { overflow-y: auto; flex: 1; }

.modal__step { display: none; padding: 1.4rem; }
.modal__step.is-visible { display: block; }
.modal__steph { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.modal__steph small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; margin-top: .15rem; }

.modal__crumbs { margin-bottom: 1.2rem; }
.modal__back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}
.modal__back svg { width: 14px; height: 14px; }
.modal__back:hover { color: var(--accent); }

/* Step 1: cards de categorías */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  background: var(--bg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: background .25s var(--ease);
  position: relative;
}
.cat-card:hover { background: var(--bg-3); }
.cat-card.is-selected { background: var(--bg-3); box-shadow: inset 0 -2px 0 var(--accent); }
.cat-card__icon { color: var(--accent); }
.cat-card__icon svg { width: 26px; height: 26px; }
.cat-card__name { font-size: .9rem; font-weight: 600; }
.cat-card__count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--muted-2);
}

/* Step 2: grupos de filtros */
.modal__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
@media (min-width: 700px) { .modal__grid { grid-template-columns: 1fr 1fr; } }
.modal__group h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .7rem;
}
.modal__group--full { grid-column: 1 / -1; }
.modal__opts, .filtros__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.modal__opt, .fchip-input {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.modal__opt input, .fchip-input input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.modal__opt__check { display: none; }
.modal__opt__label, .fchip-input span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .42rem .9rem;
  font-size: .82rem;
  color: var(--text);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.modal__opt__count, .fchip-input small {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-2);
}
.modal__opt:hover .modal__opt__label, .fchip-input:hover span { border-color: var(--muted); }
.modal__opt input:checked ~ .modal__opt__label,
.fchip-input input:checked ~ span {
  background: var(--chip-color, var(--accent));
  border-color: var(--chip-color, var(--accent));
  color: #fff;
}
.modal__opt input:checked ~ .modal__opt__label .modal__opt__count,
.fchip-input input:checked ~ span small { color: rgba(255,255,255,.75); }

.modal__range { display: flex; align-items: center; gap: .6rem; max-width: 340px; }
.modal__range input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: .55rem .8rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  outline: 0;
}
.modal__range input:focus { border-color: var(--accent); }
.modal__range__sep { color: var(--muted-2); }

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line);
}
.modal__cta { flex: 1; max-width: 340px; }
.modal__cta [data-modal-count] { font-family: var(--font-mono); }

/* =========================================================================
   COMPARE BAR
   ========================================================================= */
.compare-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  background: rgba(10,11,12,.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  transform: translateY(100%);
  transition: transform .35s var(--ease);
}
.compare-bar.is-open { transform: translateY(0); }
body.compare-open { padding-bottom: 88px; }
.compare-bar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .8rem var(--pad-x);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.compare-bar__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare-bar__slots { display: flex; gap: .5rem; flex: 1; }
.compare-slot {
  width: 52px; height: 52px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  position: relative;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: visible;
}
.compare-slot:not(.compare-slot--filled) { background: transparent; }
.compare-slot img { max-width: 85%; max-height: 85%; object-fit: contain; }
.compare-slot__del {
  position: absolute;
  top: -7px; right: -7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 0;
  font-size: 11px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
}

/* Tabla comparativa / carrito */
.cot-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.4rem;
  display: none;
}
.cot-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--line);
}
.cot-table td {
  padding: .8rem;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
  vertical-align: middle;
}
.cot-table .num { text-align: right; font-family: var(--font-mono); font-size: .85rem; }
.cot-table__img {
  width: 54px; height: 54px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 4px;
}
@media (min-width: 900px) {
  .cot-table { display: table; }
  .cot-items { display: none; }
}

/* Carrito móvil: cards */
.cot-items { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1.4rem; }
.cot-item {
  display: flex;
  gap: .9rem;
  background: var(--bg);
  padding: .9rem;
  position: relative;
}
.cot-item__img {
  width: 64px; height: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 4px;
  flex-shrink: 0;
}
.cot-item__info { flex: 1; min-width: 0; }
.cot-item__sku {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--accent);
}
.cot-item__name { font-size: .88rem; font-weight: 600; margin: .2rem 0 .5rem; }
.cot-item__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  font-size: .82rem;
  color: var(--muted);
}
.cot-item__row b { color: var(--text); font-family: var(--font-mono); font-size: .82rem; }
.cot-item__qty, .qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.cot-item__qty button, .qty-stepper button {
  width: 34px; height: 34px;
  background: var(--bg-2);
  border: 0;
  color: var(--text);
  font-size: 1rem;
  transition: background .2s var(--ease);
}
.cot-item__qty button:hover, .qty-stepper button:hover { background: var(--bg-3); }
.cot-item__qty input, .qty-stepper input {
  width: 46px; height: 34px;
  background: var(--bg);
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--text);
  text-align: center;
  font-family: var(--font-mono);
  font-size: .85rem;
  outline: 0;
  -moz-appearance: textfield;
}
.cot-item__qty input::-webkit-outer-spin-button,
.cot-item__qty input::-webkit-inner-spin-button,
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cot-item__del {
  position: absolute;
  top: .6rem; right: .6rem;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.cot-item__del:hover { color: var(--err); border-color: var(--err); }
.cot-table .cot-item__del { position: static; }

/* Resumen */
.cot-resumen {
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
  padding: 1.4rem;
  max-width: 560px;
}
.cot-resumen__row {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  color: var(--muted);
  font-size: .92rem;
}
.cot-resumen__row b { font-family: var(--font-mono); color: var(--text); }
.cot-resumen__row--total {
  border-top: 1px solid var(--line);
  margin-top: .5rem;
  padding-top: .9rem;
  color: var(--text);
  font-weight: 600;
}
.cot-resumen__row--total b { color: var(--accent); font-size: 1.15rem; }
.cot-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }

/* Campos de formulario */
.field { margin-bottom: .9rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .35rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: .7rem .9rem;
  font-size: .92rem;
  outline: 0;
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.flash {
  border-radius: 4px;
  padding: .8rem 1rem;
  font-size: .88rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.flash--err { border-color: rgba(255,42,42,.4); color: var(--accent-soft); background: rgba(255,42,42,.06); }
.flash--ok  { border-color: rgba(63,219,76,.4); color: var(--ok); background: rgba(63,219,76,.06); }

/* =========================================================================
   FICHA DE PRODUCTO
   ========================================================================= */
.fp__back {
  display: inline-flex;
  margin: 1.6rem 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.fp__back:hover { color: var(--accent); }
.fp {
  display: grid;
  gap: 2rem;
  margin-top: 1.2rem;
}
@media (min-width: 900px) { .fp { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.fp__gallery {
  position: relative;
  background: #fff;
  border-radius: 4px;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
}
.fp__gallery img { max-width: 80%; max-height: 80%; object-fit: contain; }
.fp__gallery__badge {
  position: absolute;
  top: .8rem; left: .8rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  background: var(--bg);
  color: var(--muted);
  border-radius: 4px;
  padding: .3rem .6rem;
}
.fp__breadcrumb {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1rem;
}
.fp__breadcrumb a { color: var(--muted); }
.fp__breadcrumb a:hover { color: var(--accent); }
.fp__sku {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent);
}
.fp__info h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: .98;
  text-transform: uppercase;
  margin: .4rem 0 1rem;
}
.fp__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.4rem; }
.fp__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .25rem .55rem;
}
.fp__tag--volt { color: var(--veh-tracto); border-color: rgba(255,176,32,.35); }
.fp__pricebox {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
  padding: 1.3rem;
}
.fp__price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.fp__price small { display: block; color: var(--muted); font-size: .72rem; font-weight: 400; letter-spacing: .05em; margin-top: .2rem; }
.fp__qty { margin-bottom: 1rem; }
.fp__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.fp__desc { margin-top: 1.6rem; }
.fp__desc h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .6rem;
}
.fp__desc p { color: var(--muted); font-size: .93rem; }
.fp__specs { margin-top: 1.6rem; border-top: 1px solid var(--line); }
.fp__spec {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.fp__spec span { color: var(--muted); }
.fp__spec b { font-family: var(--font-mono); font-size: .8rem; text-align: right; }

.related { margin-top: 3.5rem; }
.related h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  margin-top: 4rem;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.4rem var(--pad-x);
}
.footer__brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.footer__brand img { height: 34px; width: auto; opacity: .85; }
.footer__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__meta {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
  font-size: .8rem;
  color: var(--muted-2);
}
.footer__meta a { color: var(--muted); }
.footer__meta a:hover { color: var(--accent); }

/* FAB WhatsApp */
.fab-wa {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 80;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: transform .25s var(--ease);
}
.fab-wa:hover { transform: translateY(-3px); }
.fab-wa svg { width: 26px; height: 26px; }
body.compare-open .fab-wa { bottom: 96px; }

/* =========================================================================
   ADMIN
   ========================================================================= */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: 230px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 1.4rem 1rem;
  display: none;
  flex-direction: column;
}
.admin-side__brand { margin-bottom: 1.8rem; }
.admin-side__brand img { width: 100%; max-width: 150px; height: auto; margin-bottom: .5rem; }
.admin-side__tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.admin-side nav { display: flex; flex-direction: column; gap: .2rem; }
.admin-side nav a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .8rem;
  border-radius: 4px;
  font-size: .88rem;
  color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.admin-side nav a svg { width: 17px; height: 17px; }
.admin-side nav a:hover { background: var(--bg-3); color: var(--text); }
.admin-side nav a.is-active { background: var(--bg-3); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.admin-main {
  flex: 1;
  min-width: 0;
  padding: 1.6rem var(--pad-x) 3rem;
}
@media (min-width: 900px) { .admin-side { display: flex; } }

.admin-topnav {
  display: flex;
  gap: .3rem;
  overflow-x: auto;
  padding-bottom: .8rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.admin-topnav a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
}
.admin-topnav a.is-active { color: var(--text); border-color: var(--accent); }
@media (min-width: 900px) { .admin-topnav { display: none; } }

.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.admin-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1;
  text-transform: uppercase;
}
.admin-header__sub { color: var(--muted); font-size: .85rem; margin-top: .3rem; }

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 1.6rem;
}
@media (min-width: 900px) { .admin-kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--bg); padding: 1.1rem; }
.kpi__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}
.kpi__value { font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1; }
.kpi__delta { color: var(--muted-2); font-size: .78rem; margin-top: .3rem; }
.kpi__delta--neg { color: var(--warn); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--line);
}
.admin-table th {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.admin-table td {
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--line);
  font-size: .87rem;
  vertical-align: middle;
}
.admin-table .num { text-align: right; font-family: var(--font-mono); font-size: .82rem; }
.admin-table__img {
  width: 42px; height: 42px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 3px;
}
.admin-table__toggle {
  width: 38px; height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  position: relative;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.admin-table__toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.admin-table__toggle.is-on { background: rgba(63,219,76,.15); border-color: var(--ok); }
.admin-table__toggle.is-on::after { transform: translateX(16px); background: var(--ok); }

.admin-input {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  padding: .45rem .6rem;
  font-size: .85rem;
  outline: 0;
}
.admin-input:focus { border-color: var(--accent); }
.admin-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.admin-filters input[type=text], .admin-filters input[type=search] { flex: 1; min-width: 180px; }

.estado-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .25rem .5rem;
  color: var(--muted);
}
.estado-tag--enviada  { color: var(--warn); border-color: rgba(255,176,32,.4); }
.estado-tag--revisada { color: var(--veh-auto); border-color: rgba(0,225,255,.4); }
.estado-tag--aprobada { color: var(--ok); border-color: rgba(63,219,76,.4); }
.estado-tag--rechazada, .estado-tag--vencida { color: var(--muted-2); }

/* Clasificación tricolor (panel Etapa 1) */
.clasif-veh {
  display: inline-flex;
  gap: 4px;
}
.clasif-veh button {
  --veh: var(--muted);
  width: 34px; height: 30px;
  display: grid;
  place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  transition: all .2s var(--ease);
}
.clasif-veh button svg { width: 17px; height: 17px; }
.clasif-veh button:hover { color: var(--veh); border-color: var(--veh); }
.clasif-veh button.is-on { color: #0a0b0c; background: var(--veh); border-color: var(--veh); }
.clasif-veh button[data-veh="auto"]   { --veh: var(--veh-auto); }
.clasif-veh button[data-veh="tracto"] { --veh: var(--veh-tracto); }
.clasif-veh button[data-veh="moto"]   { --veh: var(--veh-moto); }

.semaforo {
  display: flex;
  align-items: center;
  gap: .8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
  padding: .9rem 1.1rem;
  margin-bottom: 1.2rem;
}
.semaforo__bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-3);
  overflow: hidden;
}
.semaforo__fill {
  height: 100%;
  background: linear-gradient(to right, var(--err), var(--warn), var(--ok));
  transition: width .4s var(--ease);
}
.semaforo__num { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* Login */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,42,42,.08), transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2.2rem;
}
.login-card__logo { width: 190px; max-width: 100%; height: auto; margin: 0 auto 1rem; display: block; }
.login-card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  text-transform: uppercase;
  text-align: center;
}
.login-card > p { color: var(--muted); font-size: .85rem; text-align: center; margin: .3rem 0 1.4rem; }

/* Utilidades */
.section-cta { text-align: center; margin-top: 2.5rem; }
@media print {
  .topbar, .footer, .fab-wa, .compare-bar, .cot-actions, .toolbar__assist { display: none !important; }
  body { background: #fff; color: #000; }
  .is-inner .main { padding-top: 0; }
}

/* =========================================================================
   PCAR — Carruseles de productos del home (admin/inicio.php)
   Loop infinito: la pista contiene 2 mitades idénticas y anima a -50%,
   por eso NO usa gap (el margen va en la card) — así no hay brinco al reiniciar.
   ========================================================================= */
.pcar-zone { background: var(--bg); }
.pcar { padding: clamp(3rem, 6vw, 4.8rem) 0; border-top: 1px solid var(--line); }
.pcar__head {
  max-width: var(--maxw);
  margin: 0 auto clamp(1.5rem, 3vw, 2.4rem);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.pcar__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin-top: .6rem;
}
.pcar__head h2 em { font-style: normal; color: var(--accent); }
.pcar__all {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: .4rem;
}
.pcar__all:hover { color: var(--accent); }
.pcar__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.pcar__track {
  display: flex;
  width: max-content;
  animation: pcar-run var(--dur, 60s) linear infinite;
  will-change: transform;
}
.pcar:hover .pcar__track,
.pcar__track:focus-within { animation-play-state: paused; }
@keyframes pcar-run { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .pcar__track { animation: none; flex-wrap: nowrap; overflow-x: auto; width: auto; }
}
.pcar-card {
  flex: 0 0 auto;
  width: 200px;
  margin-right: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
@media (min-width: 768px) { .pcar-card { width: 240px; margin-right: 14px; } }
.pcar-card:hover { border-color: var(--muted); transform: translateY(-3px); }
.pcar-card__img {
  display: block;
  aspect-ratio: 1 / 1;
  background: #fff;
  overflow: hidden;
}
.pcar-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform .35s var(--ease);
}
.pcar-card:hover .pcar-card__img img { transform: scale(1.05); }
.pcar-card__body {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .8rem .9rem 1rem;
  border-top: 1px solid var(--line);
}
.pcar-card__sku {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.pcar-card__name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.15em;
}
.pcar-card__price {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent-soft, var(--accent));
  margin-top: .15rem;
}
.pcar-card__price small { color: var(--muted-2); font-weight: 400; font-size: .64rem; }

/* =========================================================================
   ADMIN · Página de inicio (carruseles)
   ========================================================================= */
.crs-nueva {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.crs-nueva input[type="text"] {
  flex: 1;
  min-width: 240px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 14px;
  color: var(--text);
  font-size: .9rem;
}
.crs-nueva input[type="text"]:focus { border-color: var(--accent); outline: none; }
.crs {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 18px;
  overflow: hidden;
}
.crs--off { opacity: .55; }
.crs__head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.crs__head form { margin: 0; }
.crs__orden { display: flex; align-items: center; gap: 6px; }
.crs__num {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted-2);
}
.crs__arrow {
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: .8rem;
  line-height: 1;
}
.crs__arrow:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.crs__arrow:disabled { opacity: .3; cursor: default; }
.crs__titulo { display: flex; gap: 6px; flex: 1; min-width: 220px; }
.crs__titulo input[type="text"] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--text);
  font-size: .92rem;
  font-weight: 600;
}
.crs__titulo input[type="text"]:focus { border-color: var(--accent); outline: none; }
.crs__btn-sm { padding: 6px 12px; font-size: 11px; }
.crs__acciones { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.crs__count {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.crs__del {
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
}
.crs__del svg { width: 14px; height: 14px; }
.crs__del:hover { color: var(--accent); border-color: var(--accent); }
.crs__items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px 16px;
}
@media (min-width: 700px)  { .crs__items { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .crs__items { grid-template-columns: repeat(3, 1fr); } }
.crs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 62px;
}
.crs-item > img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 3px;
  flex: 0 0 auto;
}
.crs-item__info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.crs-item__sku {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.crs-item__name {
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crs-item__off { font-size: .68rem; color: var(--veh-tracto); }
.crs-item--inactivo { border-style: dashed; opacity: .7; }
.crs-item__ctrl { display: flex; gap: 5px; }
.crs-item__ctrl form { margin: 0; }
.crs-item--add {
  justify-content: center;
  border-style: dashed;
  color: var(--muted);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  transition: color .2s, border-color .2s;
  background: transparent;
}
.crs-item--add:hover { color: var(--accent); border-color: var(--accent); }
.crs-item--add__plus { font-size: 1.3rem; line-height: 1; margin-right: 4px; }

/* Buscador del modal "Agregar producto" */
.buscador { padding: 1.2rem 1.4rem 1.6rem; }
.buscador input[type="search"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--text);
  font-size: .95rem;
}
.buscador input[type="search"]:focus { border-color: var(--accent); outline: none; }
.buscador__resultados { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.buscador__hint { color: var(--muted-2); font-size: .82rem; padding: 6px 2px; }
.buscador__item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--text);
  transition: border-color .2s;
}
.buscador__item:hover { border-color: var(--accent); }
.buscador__item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #fff;
  border-radius: 3px;
  flex: 0 0 auto;
}
.buscador__item b {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--muted);
  display: block;
}
.buscador__item span {
  font-size: .82rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.buscador__item .buscador__add {
  margin-left: auto;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  flex: 0 0 auto;
}
