/* ==============================================
   ERC DESIGN SYSTEM — v2.0 Minimalista Corporativo
   Color base: #1708e4 | Fondo: Blanco
   ============================================== */

/* === VARIABLES === */
:root {
  /* Marca — paleta azul ERC */
  --primary:        #1708e4;   /* azul principal */
  --primary-dark:   #0803bd;   /* azul oscuro (hover) */
  --primary-darker: #0000aa;   /* azul más profundo */
  --primary-light:  #1e0bf7;   /* azul vivo (acento) */
  --primary-soft:   #ececfe;   /* fondo tintado muy suave */
  --primary-mid:    #c9c6fb;   /* borde/acento suave */
  --primary-a08:    rgba(23,8,228,.08);
  --primary-a10:    rgba(23,8,228,.10);
  --primary-a13:    rgba(23,8,228,.13);
  --primary-a18:    rgba(23,8,228,.18);
  --primary-a35:    rgba(23,8,228,.35);

  /* Fondos */
  --bg-white:  #ffffff;
  --bg-light:  #f7f7fa;       /* gris muy suave */
  --bg-alt:    #f0f0f0;       /* secciones (gris claro) */
  --bg-dark:   #07073a;       /* solo hero/footer (azul profundo) */

  /* Textos */
  --text-dark:   #1a1a1a;     /* títulos */
  --text-body:   #333333;     /* párrafos */
  --text-muted:  #6b7280;     /* secundario */
  --text-hint:   #9ca3af;     /* placeholder */
  --text-white:  #ffffff;
  --text-primary: #1708e4;

  /* Bordes */
  --border:       #e5e7eb;
  --border-focus: #1708e4;

  /* Estado */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #3b82f6;

  /* Tipografía */
  --font-main:  "Inter", system-ui, sans-serif;
  --font-brand: "Outfit", "Inter", sans-serif;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 36px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 60px rgba(23,8,228,.15);
  --shadow-primary: 0 8px 24px rgba(23,8,228,.28);

  /* Radios */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;
  --r-full: 9999px;

  /* Transición */
  --t: all .25s ease;
}

/* === RESET Y BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; }
body {
  font-family: var(--font-main);
  background: var(--bg-white);
  color: var(--text-body);
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--t); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea {
  font-family: inherit;
  font-size: .95rem;
  color: var(--text-dark);
}
input::placeholder, textarea::placeholder { color: var(--text-hint); }

/* === CONTENEDOR === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ================================================
   TIPOGRAFÍA
   ================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-brand);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}
.page-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-dark);
}
.page-title .accent { color: var(--primary); }
.section-tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-mid);
  padding: 5px 16px;
  border-radius: var(--r-full);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-brand);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 56px; }

/* ================================================
   BOTONES
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: .93rem;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
  text-decoration: none;
}
/* Primario */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}
/* Outline */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}
/* Ghost */
.btn-ghost {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-soft);
}
.btn-ghost:hover { background: var(--primary-mid); }
/* WhatsApp */
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}
.btn-whatsapp:hover {
  background: #1da851;
  box-shadow: 0 8px 20px rgba(37,211,102,.3);
  transform: translateY(-2px);
}
/* Tamaños */
.btn-sm  { padding: 8px 18px; font-size: .84rem; }
.btn-lg  { padding: 14px 34px; font-size: 1rem; }
.btn-xl  { padding: 17px 42px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ================================================
   PRELOADER
   ================================================ */
.preloader {
  position: fixed; inset: 0;
  background: var(--bg-white);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo {
  font-family: var(--font-brand);
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-align: center;
}
.preloader-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ================================================
   HEADER Y NAVBAR — Fondo Blanco, Texto Oscuro
   ================================================ */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 990; /* Bajamos a 990, y nav-menu en móvil lo ajustamos a 980 */
  width: 100%;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(229,231,235,.9);
  box-shadow: 0 12px 34px rgba(17,24,39,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header.scrolled { box-shadow: 0 14px 38px rgba(17,24,39,.1); }
/* Barra superior */
.header-top {
  background: var(--primary);
  padding: 8px 0;
}
.header-top-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
}
.header-contact-info { display: flex; gap: 24px; }
.header-top-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-info-item {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  font-weight: 500;
  transition: var(--t);
}
.header-info-item:hover { color: #fff; }
.header-info-item i { font-size: .9rem; opacity: .8; }
.header-user-badge {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,.88);
  font-size: .82rem; font-weight: 700;
  max-width: 260px; min-width: 0;
}
.header-user-badge span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.header-user-badge:hover { color: #fff; }
.btn-whatsapp-top {
  display: flex; align-items: center; gap: 6px;
  background: #25D366;
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: .82rem;
  font-weight: 700;
  transition: var(--t);
  border: 1px solid #25D366;
}
.btn-whatsapp-top:hover { background: #1da851; border-color: #1da851; }
/* Navbar */
.navbar { padding: 0; }
.navbar-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  min-height: 74px; gap: 24px;
}
/* Logo */
.navbar-brand {
  display: flex; align-items: center;
  gap: 12px; text-decoration: none; flex-shrink: 0;
  padding: 8px 0;
}
.logo-badge {
  width: 48px; height: 48px;
  background: var(--primary);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-primary);
}
.logo-badge--sm { width: 38px; height: 38px; }
.logo-text {
  font-family: var(--font-brand);
  font-size: 1.1rem; font-weight: 900;
  color: #fff; letter-spacing: 1px;
}
.brand-name {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.05rem; font-weight: 800;
  color: var(--text-dark);
  letter-spacing: .3px;
}
.brand-sub {
  display: block;
  font-size: .63rem; color: var(--text-muted);
  font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase;
}
/* Menú */
.nav-menu {
  display: flex; align-items: center;
  list-style: none; gap: 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  color: var(--text-body);
  font-size: .9rem; font-weight: 600;
  transition: var(--t);
}
.nav-link i { font-size: .82rem; color: var(--primary); }
.nav-link:hover { color: var(--primary); background: var(--primary-soft); }
.nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--primary-mid);
}
/* Acciones navbar */
.navbar-actions { display: flex; align-items: center; gap: 10px; }
.btn-carrito {
  position: relative;
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-dark);
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t);
}
.btn-carrito:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-mid); }
.carrito-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--danger);
  color: #fff; font-size: .64rem; font-weight: 800;
  width: 20px; height: 20px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  border: 2px solid var(--bg-white);
}
.carrito-badge:not(:empty) { display: flex; }
.btn-login { padding: 9px 22px; font-size: .9rem; }
/* Dropdown usuario */
.nav-dropdown { position: relative; }
.dropdown-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-mid);
  border-radius: var(--r-sm);
  color: var(--primary);
  font-weight: 700; font-size: .9rem;
  transition: var(--t);
}
.dropdown-toggle:hover { background: var(--primary); color: #fff; }
.dropdown-chevron { font-size: .7rem; transition: transform .2s ease; }
.dropdown-toggle[aria-expanded="true"] .dropdown-chevron { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 0;
  min-width: 230px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
}
.dropdown-menu.open { display: block; }
.dropdown-user {
  padding: 10px 16px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.dropdown-user span {
  color: var(--text-dark); font-size: .9rem; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dropdown-user small {
  color: var(--text-muted); font-size: .75rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dropdown-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  color: var(--text-body);
  font-size: .9rem; font-weight: 500;
  transition: var(--t);
}
.dropdown-menu li a:hover { background: var(--primary-soft); color: var(--primary); }
.dropdown-menu li a i { width: 16px; color: var(--primary); }
.dropdown-divider { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
/* Hamburguesa */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.hamburger-line {
  width: 24px; height: 2px;
  background: var(--text-dark);
  border-radius: 2px; transition: var(--t);
}
.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ================================================
   HERO — Minimalista con detalle de color
   ================================================ */
.hero-split {
  min-height: 90vh;
  background: var(--bg-white);
  display: flex; align-items: center;
  padding: 100px 0 60px;
  position: relative; overflow: hidden;
}
/* Decoración diagonal en lado derecho */
.hero-split::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 44%;
  height: 100%;
  background: var(--bg-alt);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}
.hero-split .container {
  position: relative; z-index: 2;
  display: flex; align-items: center;
  gap: 64px; justify-content: space-between;
}
.hero-left { flex: 1; max-width: 620px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-mid);
  color: var(--primary);
  padding: 8px 20px; border-radius: var(--r-full);
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 24px;
}
.hero-h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-kpis {
  display: flex; gap: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.kpi strong {
  display: block;
  font-family: var(--font-brand);
  font-size: 2rem; font-weight: 900;
  color: var(--text-dark);
}
.kpi span { font-size: .82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
/* Formulario Registro Hero */
.hero-right { flex-shrink: 0; width: 100%; max-width: 400px; }
.register-form-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-xl);
}
.register-form-card .card-heading {
  font-family: var(--font-brand);
  font-size: 1.5rem; font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.register-form-card .card-sub {
  font-size: .88rem; color: var(--text-muted);
  margin-bottom: 28px;
}
/* Campos formulario (compartido) */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .83rem; font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-dark);
  font-size: .93rem;
  outline: none;
  transition: var(--t);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  background: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(23,8,228,.09);
}
.field select option { background: var(--bg-white); color: var(--text-dark); }
.field-icon { position: relative; }
.field-icon i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--primary-light); font-size: .9rem;
  pointer-events: none;
}
.field-icon input { padding-left: 42px; }
.form-link {
  margin-top: 18px; text-align: center;
  font-size: .84rem; color: var(--text-muted);
}
.form-link a { color: var(--primary); font-weight: 700; }
.form-link a:hover { text-decoration: underline; }

/* ================================================
   SECCIONES GENERALES (fondo blanco y alternativos)
   ================================================ */
.sec { padding: 90px 0; }
.sec--white { background: var(--bg-white); }
.sec--light { background: var(--bg-light); }
.sec--primary { background: var(--primary); }
.sec--dark  { background: var(--bg-dark); }

/* ================================================
   CARDS GENÉRICAS
   ================================================ */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--t);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-title {
  font-family: var(--font-brand);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 10px;
}

/* ================================================
   SECCIÓN WHY — FEATURES
   ================================================ */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 36px 28px;
  transition: var(--t);
  text-align: center;
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-6px);
}
.feature-icon {
  width: 68px; height: 68px;
  background: var(--primary-soft);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem; color: var(--primary);
  transition: var(--t);
}
.feature-card:hover .feature-icon {
  background: var(--primary); color: #fff;
}
.feature-card h3 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 10px;
}
.feature-card p { font-size: .9rem; color: var(--text-muted); }

/* ================================================
   TIPOS DE RECAMBIOS
   ================================================ */
.types-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.type-card {
  border-radius: var(--r-md);
  padding: 36px 24px; text-align: center;
  border: 1px solid var(--border);
  background: var(--bg-white);
  transition: var(--t); cursor: pointer;
}
.type-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.type-icon { font-size: 2.5rem; margin-bottom: 18px; }
.type-card--original .type-icon { color: var(--success); }
.type-card--ian .type-icon        { color: var(--primary); }
.type-card--recon .type-icon      { color: var(--warning); }
.type-card--recup .type-icon      { color: #8b5cf6; }
.type-card h3 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 10px;
}
.type-card p { font-size: .87rem; color: var(--text-muted); margin-bottom: 18px; }
.type-link {
  font-size: .85rem; font-weight: 700;
  color: var(--primary); display: inline-flex;
  align-items: center; gap: 6px;
}
.type-link:hover { gap: 10px; }

/* ================================================
   PASOS — CÓMO FUNCIONA
   ================================================ */
.steps-row {
  display: flex; align-items: flex-start;
  gap: 0; justify-content: center;
}
.step { flex: 1; text-align: center; padding: 0 20px; }
.step-num {
  font-family: var(--font-brand);
  font-size: 2.5rem; font-weight: 900;
  color: var(--primary-soft);
  line-height: 1;
  margin-bottom: 14px;
}
.step-circle {
  width: 72px; height: 72px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem; color: #fff;
  box-shadow: var(--shadow-primary);
}
.step h4 {
  font-size: 1rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 8px;
}
.step p { font-size: .87rem; color: var(--text-muted); max-width: 180px; margin: 0 auto; }
.step-arrow { font-size: 1.4rem; color: var(--primary-mid); padding-top: 80px; flex-shrink: 0; }


/* ================================================
   TESTIMONIOS
   ================================================ */
.testi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.testi-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 32px;
  transition: var(--t);
}
.testi-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.testi-stars { color: #f59e0b; font-size: .95rem; letter-spacing: 2px; margin-bottom: 16px; }
.testi-text { color: var(--text-body); line-height: 1.7; font-size: .95rem; margin-bottom: 22px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 42px; height: 42px;
  background: var(--primary-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--primary);
}
.testi-author strong { display: block; font-size: .9rem; color: var(--text-dark); }
.testi-author span { font-size: .8rem; color: var(--text-muted); }

/* ================================================
   CTA FINAL
   ================================================ */
.cta-banner {
  background: var(--primary);
  border-radius: var(--r-xl);
  padding: 70px 60px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute; top: -60%; right: -5%;
  width: 380px; height: 380px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.cta-text { position: relative; z-index: 1; }
.cta-text h2 {
  font-family: var(--font-brand); font-size: 2.2rem;
  font-weight: 800; color: #fff;
  margin-bottom: 12px;
}
.cta-text p { color: rgba(255,255,255,.8); font-size: 1rem; max-width: 480px; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.btn-cta-white {
  background: #fff; color: var(--primary);
  border-color: #fff; font-weight: 700;
  transition: var(--t);
}
.btn-cta-white:hover { background: var(--primary-soft); }
.btn-cta-ghost {
  background: rgba(255,255,255,.1); color: #fff;
  border: 2px solid rgba(255,255,255,.4);
}
.btn-cta-ghost:hover { background: rgba(255,255,255,.2); }

/* ================================================
   FOOTER
   ================================================ */
.site-footer { background: #111827; }
.footer-main { padding: 80px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
}
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-desc { color: rgba(255,255,255,.5); font-size: .88rem; line-height: 1.7; margin-bottom: 24px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: .9rem; transition: var(--t);
}
.social-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.social-whatsapp:hover { background: #25D366; border-color: #25D366; }
.footer-heading {
  font-family: var(--font-brand); font-size: .95rem;
  font-weight: 700; color: #fff;
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  color: rgba(255,255,255,.5);
  font-size: .88rem; display: flex;
  align-items: center; gap: 8px;
  transition: var(--t);
}
.footer-links a:hover { color: rgba(255,255,255,.85); padding-left: 4px; }
.footer-links i { font-size: .7rem; color: var(--primary-mid); }
.footer-contact-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.footer-contact-list li { display: flex; gap: 12px; color: rgba(255,255,255,.5); font-size: .88rem; }
.footer-contact-list i { color: var(--primary-mid); margin-top: 3px; flex-shrink: 0; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: rgba(255,255,255,.6); }
.footer-contact-list a { color: rgba(255,255,255,.5); }
.footer-contact-list a:hover { color: rgba(255,255,255,.85); }
.btn-whatsapp-footer {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff;
  padding: 11px 22px; border-radius: var(--r-sm);
  font-size: .88rem; font-weight: 700; transition: var(--t);
}
.btn-whatsapp-footer:hover { background: #1da851; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07); padding: 22px 0;
}
.footer-bottom-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-copy { color: rgba(255,255,255,.35); font-size: .82rem; }
.footer-copy strong { color: rgba(255,255,255,.55); }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { color: rgba(255,255,255,.3); font-size: .8rem; }
.footer-legal a:hover { color: rgba(255,255,255,.65); }

/* ================================================
   WHATSAPP FLOTANTE
   ================================================ */
.whatsapp-float {
  position: fixed; bottom: 30px; right: 30px; z-index: 800;
  width: 58px; height: 58px;
  background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff;
  box-shadow: 0 8px 28px rgba(37,211,102,.4);
  animation: waPulse 2.5s infinite;
  transition: var(--t);
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 12px 36px rgba(37,211,102,.5); }
.whatsapp-tooltip {
  position: absolute; right: 70px;
  background: var(--text-dark); color: #fff;
  padding: 6px 14px; border-radius: var(--r-sm);
  font-size: .8rem; font-weight: 600;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: var(--t);
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(37,211,102,.4); }
  50% { box-shadow: 0 8px 40px rgba(37,211,102,.6), 0 0 0 8px rgba(37,211,102,.08); }
}

/* ================================================
   MODAL CARRITO
   ================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.55);
  backdrop-filter: blur(6px);
  z-index: 900; display: flex;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-container {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 100%; max-width: 680px;
  max-height: 90vh; display: flex;
  flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-family: var(--font-brand);
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-dark);
  display: flex; align-items: center; gap: 10px;
}
.modal-header h2 i { color: var(--primary); }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-light); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t);
}
.modal-close:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.modal-body { flex: 1; overflow-y: auto; padding: 28px; }
.modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
}
.carrito-vacio { text-align: center; padding: 40px; color: var(--text-muted); }
.carrito-vacio i { font-size: 3rem; color: var(--primary-mid); margin-bottom: 16px; display: block; }
.carrito-total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: .9rem; color: var(--text-muted); }
.carrito-total strong { font-size: 1.2rem; color: var(--text-dark); font-family: var(--font-brand); }
.carrito-acciones { display: flex; gap: 12px; justify-content: flex-end; }

/* Toast */
.toast-container { position: fixed; top: 90px; right: 24px; z-index: 1100; display: flex; flex-direction: column; gap: 12px; }
.toast {
  background: var(--bg-white); border-radius: var(--r-sm);
  padding: 15px 20px; min-width: 290px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg); border-left: 4px solid var(--primary);
  animation: toastIn .3s ease;
}
.toast-success { border-color: var(--success); }
.toast-error   { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }
.toast-success i { color: var(--success); }
.toast-error i   { color: var(--danger); }
.toast-warning i { color: var(--warning); }
.toast span { color: var(--text-dark); font-size: .9rem; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ================================================
   PÁGINA 404
   ================================================ */
.error-page { min-height: 80vh; display: flex; align-items: center; background: var(--bg-light); }
.error-container { text-align: center; padding: 80px 0; }
.error-code { font-family: var(--font-brand); font-size: 10rem; font-weight: 900; color: var(--primary); opacity: .1; line-height: 1; }
.error-icon { font-size: 3.5rem; color: var(--primary); margin: -30px 0 20px; }
.error-title { font-size: 2rem; color: var(--text-dark); margin-bottom: 12px; }
.error-desc { color: var(--text-muted); margin-bottom: 32px; }
.error-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ================================================
   ANIMACIONES
   ================================================ */
.animate-fade-up {
  opacity: 0; transform: translateY(28px);
  animation: fadeUp .7s ease forwards;
}
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .3s; }
.delay-3 { animation-delay: .45s; }
.delay-4 { animation-delay: .6s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.animate-on-scroll { opacity: 0; transform: translateY(36px); transition: opacity .6s ease, transform .6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: none; }

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content { min-height: 60vh; }

/* ================================================
   LOGO IMAGEN EN NAVBAR
   ================================================ */
.navbar-logo-img {
  height: 100px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  transition: opacity .25s ease, transform .25s ease;
}
.navbar-brand:hover .navbar-logo-img { opacity: .85; transform: translateY(-1px); }

/* ================================================
   SECCIÓN NUESTROS NÚMEROS — home-stats
   ================================================ */
.home-stats {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  padding: 80px 0;
}
.home-stats-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.home-stats-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .18;
}
.home-stats-blob--1 {
  width: 420px; height: 420px;
  background: #fff;
  top: -120px; left: -80px;
  animation: blobDrift 12s ease-in-out infinite alternate;
}
.home-stats-blob--2 {
  width: 300px; height: 300px;
  background: #a5b4fc;
  bottom: -100px; right: -60px;
  animation: blobDrift 16s ease-in-out infinite alternate-reverse;
}
@keyframes blobDrift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

/* Section header variantes light-on-dark */
.section-tag--light {
  background: rgba(255,255,255,.15) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.25) !important;
}
.section-title--light { color: #fff !important; }
.section-desc--light  { color: rgba(255,255,255,.72) !important; }

/* Grid de estadísticas */
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Tarjeta individual */
.stat-card {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--r-lg);
  padding: 36px 28px 32px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: all .35s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, transparent 60%);
  pointer-events: none;
}
.stat-card:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,8,.35);
}

/* Icono SVG */
.stat-card-icon {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: all .35s ease;
}
.stat-card-icon svg { width: 38px; height: 38px; }
.stat-card:hover .stat-card-icon {
  background: rgba(255,255,255,.22);
  transform: scale(1.08) rotate(-3deg);
}

/* Número y etiqueta */
.stat-card-body { display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-family: var(--font-brand);
  font-size: 3.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  display: inline-block;
}
.stat-plus {
  font-family: var(--font-brand);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255,255,255,.7);
  margin-left: 2px;
  vertical-align: top;
  line-height: 1.2;
  display: inline-block;
}
.stat-label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-top: 10px;
  letter-spacing: .3px;
}
.stat-sub {
  display: block;
  font-size: .8rem;
  color: rgba(255,255,255,.58);
  margin-top: 6px;
  line-height: 1.45;
  max-width: 180px;
  margin-left: auto;
  margin-right: auto;
}


/* ================================================
   TIPOS DE RECAMBIOS — Rediseño Premium
   ================================================ */
.tipos-sec { background: var(--bg-light); padding: 80px 0; }
.tipos-header { text-align: center; margin-bottom: 50px; }
.tipos-split { display: flex; gap: 40px; align-items: flex-start; }
.tipos-cards { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.tipo-card {
  display: flex; gap: 20px; background: var(--bg-white);
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; cursor: pointer; transition: all .3s ease;
  position: relative; overflow: hidden;
}
.tipo-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--tipo-color); opacity: 0; transition: opacity .3s ease;
}
.tipo-card:hover, .tipo-card.active {
  border-color: var(--tipo-color); box-shadow: 0 10px 25px rgba(0,0,0,.06); transform: translateX(8px);
}
.tipo-card.active::before { opacity: 1; }

.tipo-card-left { flex-shrink: 0; }
.tipo-card-icon {
  width: 56px; height: 56px; border-radius: var(--r-md); background: rgba(0,0,0,.03);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--tipo-color); transition: all .3s ease;
}
.tipo-card:hover .tipo-card-icon, .tipo-card.active .tipo-card-icon {
  background: var(--tipo-color); color: #fff; transform: rotate(-5deg) scale(1.1);
}

.tipo-card-content { flex: 1; }
.tipo-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.tipo-badge {
  display: inline-block; padding: 4px 10px; border-radius: 100px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  background: rgba(0,0,0,.05); color: var(--text-muted); margin-bottom: 6px;
}
.tipo-card.active .tipo-badge { background: var(--tipo-color); color: #fff; }
.tipo-card-top h3 { font-size: 1.3rem; margin: 0; color: var(--text-dark); transition: color .3s; }
.tipo-card.active .tipo-card-top h3 { color: var(--tipo-color); }
.tipo-chevron { color: var(--border-hover); font-size: 1.2rem; transition: transform .3s, color .3s; }
.tipo-card:hover .tipo-chevron { transform: translateX(4px); color: var(--tipo-color); }
.tipo-desc { font-size: .95rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }
.tipo-facts { list-style: none; padding: 0; margin: 0 0 16px 0; display: flex; gap: 14px; flex-wrap: wrap; }
.tipo-facts li { font-size: .85rem; color: var(--text-color); display: flex; align-items: center; gap: 6px; }
.tipo-facts li i { color: var(--tipo-color); font-size: .8rem; }

.tipo-btn {
  display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--tipo-color);
  text-decoration: none; padding: 8px 16px; background: rgba(0,0,0,.03); border-radius: var(--r-md);
  transition: all .3s; opacity: 0; transform: translateY(10px); pointer-events: none;
}
.tipo-card:hover .tipo-btn, .tipo-card.active .tipo-btn { opacity: 1; transform: translateY(0); pointer-events: all; }
.tipo-btn:hover { background: var(--tipo-color); color: #fff; }

.tipos-showcase { flex: 0 0 420px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; }
.tipos-showcase-img {
  width: 100%; height: 500px; border-radius: var(--r-xl); background-size: cover; background-position: center;
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg); transition: background-image .5s ease-in-out;
}
.tipos-showcase-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 50%, transparent 100%); }
.tipos-showcase-label { position: absolute; bottom: 30px; left: 30px; right: 30px; display: flex; flex-direction: column; gap: 6px; color: #fff; z-index: 2; }
.tipos-showcase-icon { width: 44px; height: 44px; background: var(--primary); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 10px; }
.tipos-showcase-label strong { font-size: 1.8rem; line-height: 1.1; font-family: var(--font-brand); }
.tipos-showcase-label span { font-size: 1rem; color: rgba(255,255,255,.8); }
.tipos-showcase-cta { background: var(--bg-white); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 24px; text-align: center; }
.tipos-showcase-cta p { font-weight: 600; color: var(--text-dark); margin-bottom: 14px; font-size: 1.05rem; }


/* ================================================
   LOGIN — Overlay sobre imagen de fondo
   ================================================ */
.login-left-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 35, 122, 0.88) 0%,
    rgba(47, 54, 173, 0.80) 50%,
    rgba(10, 12, 50, 0.92) 100%
  );
  z-index: 1;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1100px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .types-grid { grid-template-columns: repeat(2, 1fr); }
  .home-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tipos-split { flex-direction: column; align-items: stretch; }
  .tipos-showcase { position: static; height: auto; flex: none; }
  .tipos-showcase-img { height: 400px; }
}
@media (max-width: 992px) {
  .navbar-inner { gap: 14px; }
  .brand-sub { display: none; }
  .nav-link { padding: 10px 11px; }
  .hero-split .container { flex-direction: column; text-align: center; }
  .hero-split::before { display: none; }
  .hero-kpis { justify-content: center; }
  .hero-right { width: 100%; }
  .register-form-card { max-width: 500px; margin: 0 auto; }
  .steps-row { flex-wrap: wrap; gap: 32px; }
  .step-arrow { display: none; }
  .testi-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; text-align: center; }
  .cta-actions { justify-content: center; }
}
@media (max-width: 768px) {
  .navbar-inner { min-height: 68px; }
  .navbar-logo-img { height: 44px; max-width: 150px; }
  .footer-logo-img { height: 48px; max-width: 180px; }

  .nav-menu {
    position: fixed; top: 0; right: 0; width: min(320px, 86vw); height: 100vh;
    background: var(--bg-white); flex-direction: column; align-items: flex-start;
    padding: 88px 24px 40px; gap: 4px;
    transform: translateX(100%); transition: transform .3s ease;
    z-index: 980; border-left: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-item { width: 100%; }
  .nav-link { width: 100%; padding: 14px 16px; font-size: 1rem; border-bottom: 1px solid var(--bg-light); }
  .hamburger { display: flex; position: relative; z-index: 1000; }
  .navbar-actions { gap: 8px; position: relative; z-index: 1000; }
  .dropdown-toggle span,
  .btn-login span { display: none; }
  .dropdown-toggle,
  .btn-login { width: 42px; height: 42px; padding: 0; justify-content: center; }
  .dropdown-chevron { display: none; }
  .dropdown-menu { right: -48px; min-width: 230px; }
  .features-grid { grid-template-columns: 1fr; }
  .types-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-contact-info { display: none; }
  .header-top-inner { justify-content: flex-end; }
  .header-user-badge { max-width: 170px; }
  .cta-banner { padding: 48px 28px; border-radius: var(--r-lg); }
  /* Tipos de recambios 1 col en móvil */
  .home-type-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .home-type-card { min-height: 240px; }
  .home-type-card-body { padding: 20px 18px; }
  /* Brands */
  .brand-card { flex: 0 0 calc(50% - 20px); }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .navbar-logo-img { 
    height: 38px;
    width: auto;
    max-width: 140px;
  }
  .btn-carrito,
  .dropdown-toggle,
  .btn-login { width: 40px; height: 40px; }
  .header-user-badge { display: none; }
  .types-grid { grid-template-columns: 1fr; }
  .hero-kpis { flex-direction: column; gap: 18px; }
  .home-type-grid { grid-template-columns: 1fr; }
  .home-type-card { min-height: 220px; }
  .brand-card { flex: 0 0 calc(50% - 20px); min-width: 120px; }
  .brand-card img { width: 64px; height: 32px; }
}

