:root {
  --bg: oklch(98.5% 0.002 250);
  --surface: oklch(100% 0 0);
  --surface-strong: oklch(99% 0.004 250);
  --ink: oklch(8% 0.004 250);
  --muted: oklch(43% 0.008 250);
  --line: oklch(88% 0.006 250);
  --soft: oklch(95% 0.004 250);
  --accent: oklch(63% 0.22 31);
  --accent-dark: oklch(48% 0.20 31);
  --metal: oklch(71% 0.012 250);
  --steel: oklch(33% 0.014 250);
  --ok: oklch(58% 0.15 145);
  --warn: oklch(72% 0.16 80);
  --danger: oklch(55% 0.20 25);
  --shadow: 0 24px 70px rgba(8,8,8,.14);
  --shadow-red: 0 18px 46px color-mix(in oklch, var(--accent) 24%, transparent);
  --glow: 0 0 0 1px color-mix(in oklch, var(--accent) 24%, transparent), 0 0 34px color-mix(in oklch, var(--accent) 20%, transparent);
  --radius: 18px;
  --font-display: 'Aptos Display','Sora','Montserrat',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-body: 'Aptos','Inter','Segoe UI',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-mono: 'JetBrains Mono','IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in oklch, var(--accent) 16%, transparent), transparent 28vw),
    radial-gradient(circle at 92% 18%, rgba(0,0,0,.13), transparent 24vw),
    linear-gradient(145deg, oklch(100% 0 0), var(--bg) 46%, oklch(94% .006 250));
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(240,80,48,.08) 36.2% 36.8%, transparent 37%),
    linear-gradient(65deg, transparent 0 58%, rgba(8,8,8,.07) 58.2% 58.7%, transparent 59%),
    repeating-linear-gradient(90deg, rgba(20,20,20,.035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(20,20,20,.025) 0 1px, transparent 1px 96px);
  mask-image: linear-gradient(to bottom, black, rgba(0,0,0,.82), transparent 88%);
}
body::after {
  z-index: -1;
  opacity: .72;
  background:
    radial-gradient(circle at 24% 22%, rgba(240,80,48,.16) 0 2px, transparent 3px),
    radial-gradient(circle at 76% 32%, rgba(0,0,0,.12) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 72%, rgba(240,80,48,.12) 0 2px, transparent 3px);
  background-size: 190px 190px, 260px 260px, 220px 220px;
  animation: particle-drift 22s linear infinite;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.shell { min-height: 100vh; position: relative; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px clamp(10px, 2vw, 26px) 0;
  padding: 12px clamp(16px, 3vw, 34px);
  background: color-mix(in oklch, var(--surface) 78%, transparent);
  border: 1px solid color-mix(in oklch, var(--surface) 70%, var(--line));
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(8,8,8,.10);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.brand img {
  width: 60px;
  height: 48px;
  object-fit: contain;
  background: white;
  border: 1px solid color-mix(in oklch, var(--accent) 22%, var(--line));
  border-radius: 14px;
  padding: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10), 0 0 26px rgba(240,80,48,.12);
}
.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .02em;
}
.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav a {
  position: relative;
  overflow: hidden;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .18s ease;
}
.nav a.active, .nav a:hover {
  background: color-mix(in oklch, var(--ink) 92%, transparent);
  color: white;
  transform: translateY(-1px);
}
.nav a.active::after, .nav a:hover::after { transform: scaleX(1); }
.actions { display: flex; align-items: center; gap: 10px; }
.btn {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  box-shadow: 0 1px 0 rgba(255,255,255,.45) inset;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: -30% auto -30% -45%;
  width: 42%;
  transform: skewX(-18deg) translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  transition: transform .42s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.015); }
.btn:hover::before { transform: skewX(-18deg) translateX(440%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; box-shadow: var(--shadow-red), 0 0 0 1px rgba(255,255,255,.22) inset; }
.btn.primary:hover { box-shadow: var(--shadow-red), 0 0 32px rgba(240,80,48,.38); }
.btn.dark { background: linear-gradient(135deg, #060606, #222); color: white; box-shadow: 0 16px 38px rgba(0,0,0,.22); }
.btn.ghost { background: color-mix(in oklch, var(--surface) 72%, transparent); color: var(--ink); border-color: color-mix(in oklch, var(--line) 72%, white); }
.btn.small { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.section { padding: clamp(42px, 7vw, 86px) 0; }
.section, .card, .black-panel, .product, h1, h2, .lead {
  animation: reveal-up .72s both;
  animation-timeline: view();
  animation-range: entry 0% cover 28%;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); border-radius: 99px; box-shadow: 0 0 18px rgba(240,80,48,.42); }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: .96;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(42px, 7vw, 92px); max-width: 960px; }
h2 { font-size: clamp(34px, 4.5vw, 62px); }
h3 { font-size: 22px; line-height: 1.08; }
h1, h2 {
  background: linear-gradient(100deg, var(--ink) 0%, var(--accent) 44%, var(--steel) 82%, var(--ink) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.black-panel h1, .black-panel h2 {
  background: linear-gradient(100deg, #fff 0%, #fff 38%, color-mix(in oklch, var(--accent) 76%, white) 62%, #d8d8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
p { color: var(--muted); line-height: 1.65; }
.lead { font-size: clamp(17px, 2vw, 22px); max-width: 760px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--surface) 88%, transparent), color-mix(in oklch, var(--surface-strong) 92%, transparent)),
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.72), transparent 38%);
  border: 1px solid color-mix(in oklch, var(--line) 82%, white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  backdrop-filter: blur(10px);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.42), transparent 34%, rgba(240,80,48,.13));
  opacity: 0;
  transition: opacity .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in oklch, var(--accent) 28%, var(--line)); box-shadow: var(--shadow), var(--glow); }
.card:hover::before { opacity: 1; }
.card.lift { box-shadow: var(--shadow); }
.black-panel {
  background:
    radial-gradient(circle at 86% 18%, rgba(240,80,48,.32), transparent 28%),
    linear-gradient(135deg, #070707, #171717 58%, #2a0c08);
  color: white;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  padding: clamp(22px, 4vw, 42px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 28px 78px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12);
  transform-style: preserve-3d;
}
.black-panel p, .black-panel .muted { color: rgba(255,255,255,.70); }
.black-panel::after {
  content: "";
  position: absolute;
  inset: auto -120px -150px auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 45%, transparent), transparent 62%);
  pointer-events: none;
  animation: pulse-glow 7s ease-in-out infinite;
}
.black-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background:
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(255,255,255,.14) 16px 17px, transparent 17px 34px),
    linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  pointer-events: none;
}
.stat { display: grid; gap: 4px; }
.stat strong {
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -.02em;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 12px;
  color: var(--muted);
  font-weight: 750;
  box-shadow: 0 1px 0 rgba(255,255,255,.58) inset;
}
.pill.hot { color: white; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); border-color: transparent; box-shadow: 0 10px 24px rgba(240,80,48,.22); }
.pill.ok { color: oklch(35% .12 145); background: oklch(94% .04 145); border-color: oklch(84% .05 145); }
.pill.warn { color: oklch(38% .12 80); background: oklch(96% .06 80); border-color: oklch(86% .08 80); }
.product {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.product:hover { transform: translateY(-8px); box-shadow: var(--shadow), 0 0 0 1px color-mix(in oklch, var(--accent) 22%, transparent); }
.product-media {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 78% 20%, rgba(240,80,48,.34), transparent 28%),
    linear-gradient(135deg, rgba(240,80,48,.22), transparent 52%),
    repeating-linear-gradient(45deg, #f7f7f7 0 10px, #e7e7e7 10px 20px);
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .28s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
}
.product:hover .product-media { transform: scale(1.025); }
.product-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(0,0,0,.18), transparent);
  pointer-events: none;
}
.price { font-family: var(--font-mono); font-weight: 900; font-size: 22px; }
.strike { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 22px 0;
}
.field {
  min-height: 44px;
  border: 1px solid color-mix(in oklch, var(--line) 80%, white);
  background: color-mix(in oklch, var(--surface) 84%, transparent);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.72) inset;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.field:focus {
  outline: none;
  border-color: color-mix(in oklch, var(--accent) 60%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 14%, transparent);
}
.field.wide { min-width: min(430px, 100%); flex: 1; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
.hero-mockup {
  min-height: 430px;
  display: grid;
  gap: 14px;
  align-content: center;
  perspective: 900px;
}
.device-card {
  position: relative;
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.62);
  box-shadow: 0 24px 62px rgba(0,0,0,.24);
  transform: rotateX(7deg) rotateY(-8deg);
  animation: float-3d 7s ease-in-out infinite;
}
.device-card:nth-child(2) { margin-left: 56px; transform: rotateX(5deg) rotateY(7deg); animation-delay: -2.2s; }
.device-card:nth-child(3) { margin-right: 70px; transform: rotateX(7deg) rotateY(-4deg); animation-delay: -4.4s; }
.device-card p { margin: 6px 0 0; }
.metric-line {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent) 24%, white));
  box-shadow: 0 0 18px rgba(240,80,48,.22);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 13px 10px; text-align: left; }
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.table tr { transition: background .18s ease; }
.table tr:hover td { background: color-mix(in oklch, var(--accent) 5%, transparent); }
.kpi { display: grid; gap: 8px; }
.kpi b { font-family: var(--font-mono); font-size: 28px; }
.footer {
  background:
    radial-gradient(circle at 18% 0%, rgba(240,80,48,.22), transparent 28%),
    linear-gradient(135deg, #060606, #141414);
  color: white;
  padding: 42px 0;
  margin-top: 50px;
}
.footer p, .footer a { color: rgba(255,255,255,.68); }
.mobile-menu { display: none; }
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  min-width: 54px;
  height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, oklch(63% .18 150), oklch(48% .16 150));
  color: white;
  font-weight: 850;
  box-shadow: 0 18px 46px rgba(0,0,0,.20), 0 0 28px rgba(37,211,102,.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 22px 58px rgba(0,0,0,.24), 0 0 34px rgba(37,211,102,.36); }
.chart-bars {
  min-height: 220px;
  align-items: end;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.chart-bars span {
  border-radius: 12px 12px 4px 4px;
  min-height: 34px;
  background: linear-gradient(to top, var(--accent-dark), var(--accent), #fff);
  box-shadow: 0 10px 26px rgba(240,80,48,.20);
  animation: grow-bar .8s ease both;
}

@keyframes particle-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 190px 190px, -260px 260px, 220px -220px; }
}
@keyframes pulse-glow {
  0%, 100% { transform: translate3d(0,0,0) scale(1); opacity: .72; }
  50% { transform: translate3d(-18px,-10px,0) scale(1.08); opacity: 1; }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes grow-bar {
  from { transform: scaleY(.35); transform-origin: bottom; opacity: .35; }
  to { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}
@keyframes float-3d {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@media (max-width: 980px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; margin: 8px 10px 0; border-radius: 20px; }
  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .actions .quote { display: none; }
  .grid.four, .grid.three, .grid.two, .split { grid-template-columns: 1fr; }
  .brand { min-width: 0; }
  body::after { opacity: .45; animation-duration: 34s; }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 14px; }
  .brand img { width: 48px; height: 38px; }
  .brand strong { font-size: 13px; }
  .brand span { display: none; }
  .actions { gap: 6px; }
  .btn { padding-inline: 12px; }
  .container { width: min(100% - 26px, 1180px); }
  .section { padding: 34px 0; }
  .card { padding: 16px; }
  .whatsapp-float { right: 14px; bottom: 14px; height: 50px; padding: 0 14px; font-size: 13px; }
  .section, .card, .black-panel, .product, h1, h2, .lead { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* =========================================================
   COREMASTERX PREMIUM MOTION UPGRADE
   Efectos globales optimizados para todas las pantallas.
   ========================================================= */
:root {
  --fx-red: rgba(240, 80, 48, .55);
  --fx-red-soft: rgba(240, 80, 48, .16);
  --fx-black: rgba(8, 8, 8, .82);
  --fx-glass: rgba(255, 255, 255, .64);
  --fx-speed: 680ms;
  --fx-curve: cubic-bezier(.2, .78, .18, 1);
}

::selection { background: color-mix(in oklch, var(--accent) 78%, white); color: white; }
:focus-visible { outline: 3px solid color-mix(in oklch, var(--accent) 55%, white); outline-offset: 4px; }

body.fx-ready {
  background-size: 140% 140%, 120% 120%, auto;
  animation: premium-bg-pan 18s ease-in-out infinite alternate;
}

body.fx-ready::before {
  animation: blueprint-slide 26s linear infinite;
}

.fx-canvas,
.fx-spotlight,
.fx-grid-glow,
.fx-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.fx-canvas { z-index: -3; opacity: .82; }
.fx-grid-glow {
  z-index: -4;
  background:
    radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 20%), rgba(240,80,48,.20), transparent 34vw),
    radial-gradient(circle at 78% 82%, rgba(0,0,0,.11), transparent 28vw),
    conic-gradient(from 180deg at 50% 50%, rgba(240,80,48,.08), transparent, rgba(0,0,0,.08), transparent, rgba(240,80,48,.08));
  filter: blur(.2px);
  animation: aurora-shift 20s ease-in-out infinite alternate;
}
.fx-noise {
  z-index: 90;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(0,0,0,.75) 0 1px, transparent 1px 3px);
}
.fx-spotlight {
  z-index: 80;
  opacity: .55;
  background: radial-gradient(circle 260px at var(--spot-x, 50%) var(--spot-y, 50%), rgba(240,80,48,.17), transparent 68%);
  mix-blend-mode: soft-light;
  transition: opacity .24s ease;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 3px;
  width: calc(var(--scroll-progress, 0) * 100%);
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), #fff, var(--accent));
  box-shadow: 0 0 22px rgba(240,80,48,.55);
  transform-origin: left;
}

.topbar {
  transform: translateZ(0);
  transition: transform .26s var(--fx-curve), box-shadow .26s var(--fx-curve), background .26s var(--fx-curve), border-color .26s var(--fx-curve);
}
.topbar.scrolled {
  background: color-mix(in oklch, var(--surface) 64%, transparent);
  box-shadow: 0 22px 70px rgba(0,0,0,.16), 0 0 0 1px rgba(255,255,255,.18) inset;
  border-color: color-mix(in oklch, var(--accent) 18%, var(--line));
  transform: translateY(2px) scale(.995);
}
.brand { position: relative; }
.brand::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  background: radial-gradient(circle at 20% 50%, rgba(240,80,48,.18), transparent 56%);
  opacity: 0;
  transform: scale(.92);
  transition: opacity .24s ease, transform .24s ease;
  z-index: -1;
}
.brand:hover::after { opacity: 1; transform: scale(1); }
.brand img { transition: transform .32s var(--fx-curve), box-shadow .32s var(--fx-curve), filter .32s var(--fx-curve); }
.brand:hover img { transform: rotate(-2deg) scale(1.05); filter: saturate(1.15) contrast(1.05); box-shadow: 0 14px 42px rgba(0,0,0,.16), 0 0 38px rgba(240,80,48,.24); }
.brand strong { transition: letter-spacing .22s ease, color .22s ease; }
.brand:hover strong { letter-spacing: .045em; color: color-mix(in oklch, var(--accent) 82%, var(--ink)); }

.nav a {
  isolation: isolate;
  will-change: transform;
}
.nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.35), transparent 42%);
  opacity: 0;
  transition: opacity .24s ease;
  z-index: -1;
}
.nav a:hover::before { opacity: 1; }
.nav a:hover { box-shadow: 0 10px 28px rgba(0,0,0,.14), 0 0 18px rgba(240,80,48,.18); }

h1, h2 {
  animation: title-shimmer 8s ease-in-out infinite alternate;
}
h1 .char, h2 .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.72em) rotateX(75deg);
  transform-origin: 50% 100%;
  animation: char-rise .78s var(--fx-curve) forwards;
  animation-delay: calc(var(--char-index, 0) * 18ms + 100ms);
  will-change: transform, opacity;
}
h3 { transition: transform .24s var(--fx-curve), color .24s ease, text-shadow .24s ease; }
.card:hover h3, .product:hover h3, .device-card:hover h3 { color: color-mix(in oklch, var(--accent) 78%, var(--ink)); text-shadow: 0 0 18px rgba(240,80,48,.14); transform: translateX(2px); }
p, label, .table td, .table th, .stat span { transition: color .22s ease, transform .22s var(--fx-curve); }
.card:hover p, .black-panel:hover p { transform: translateY(-1px); }

.section {
  position: relative;
  overflow: clip;
}
.section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(780px, 82vw);
  height: 1px;
  transform: translateX(-50%) scaleX(.45);
  opacity: .55;
  background: linear-gradient(90deg, transparent, rgba(240,80,48,.55), rgba(0,0,0,.20), transparent);
  animation: section-line 7s ease-in-out infinite;
}
.section::after {
  content: "";
  position: absolute;
  inset: 12% auto auto -140px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,80,48,.12), transparent 68%);
  filter: blur(4px);
  transform: translate3d(var(--section-drift, 0), 0, 0);
  pointer-events: none;
}

.fx-reveal {
  opacity: 0;
  transform: translateY(28px) scale(.985);
  filter: blur(9px);
  transition: opacity var(--fx-speed) var(--fx-curve), transform var(--fx-speed) var(--fx-curve), filter var(--fx-speed) var(--fx-curve);
  transition-delay: var(--reveal-delay, 0ms);
}
.fx-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.card, .black-panel, .device-card, .field, .topbar, .product-media, .chart-bars, .table {
  position: relative;
}
.card, .black-panel, .device-card, .field {
  transform-style: preserve-3d;
}
.fx-border::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(130deg, transparent, rgba(255,255,255,.75), rgba(240,80,48,.58), transparent 76%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}
.fx-border:hover::after, .field:focus::after { opacity: 1; }

.card {
  isolation: isolate;
  will-change: transform;
}
.card::after {
  content: "";
  position: absolute;
  inset: -60% -20%;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.44), transparent 58%);
  transform: translateX(-74%) rotate(8deg);
  transition: transform .7s var(--fx-curve), opacity .24s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.card > * { position: relative; z-index: 1; }
.card:hover::after { transform: translateX(74%) rotate(8deg); opacity: 1; }
.card.tilt-ready:hover, .product.tilt-ready:hover, .black-panel.tilt-ready:hover, .device-card.tilt-ready:hover {
  transform: perspective(950px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(var(--lift, -6px)) scale(var(--scale, 1.01));
}
.card.tilt-ready, .product.tilt-ready, .black-panel.tilt-ready, .device-card.tilt-ready {
  transition: transform .16s ease-out, box-shadow .24s var(--fx-curve), border-color .24s ease;
}
.card.tilt-ready:hover { --lift: -6px; }
.black-panel.tilt-ready:hover { --lift: -4px; --scale: 1.005; }
.product.tilt-ready:hover { --lift: -8px; }
.device-card.tilt-ready:hover { --lift: -6px; --scale: 1.018; }

.black-panel {
  transition: transform .28s var(--fx-curve), box-shadow .28s var(--fx-curve), border-color .28s ease, filter .28s ease;
}
.black-panel:hover {
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 34px 95px rgba(0,0,0,.31), 0 0 48px rgba(240,80,48,.18), inset 0 1px 0 rgba(255,255,255,.16);
  filter: saturate(1.05);
}
.black-panel .eyebrow, .black-panel .pill, .black-panel .stat strong { position: relative; z-index: 2; }

.product-media::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), transparent 24%),
    conic-gradient(from 90deg, transparent, rgba(240,80,48,.18), transparent, rgba(0,0,0,.10), transparent);
  opacity: .55;
  animation: media-orbit 9s linear infinite;
}
.product-media span { position: relative; z-index: 2; }
.product:hover .product-media { box-shadow: inset 0 0 0 1px rgba(255,255,255,.82), 0 18px 36px rgba(240,80,48,.14); }

.btn.magnetic {
  transform: translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0);
  will-change: transform;
}
.btn.magnetic:hover {
  transform: translate3d(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px), 0) scale(1.018);
}
.btn .ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.52);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-pop .58s ease-out forwards;
  pointer-events: none;
}
.btn span[data-cart-count] {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 0 16px rgba(255,255,255,.20);
  transition: transform .22s var(--fx-curve);
}
.btn:hover span[data-cart-count] { transform: rotate(6deg) scale(1.08); }

.field {
  caret-color: var(--accent);
}
.field:hover { transform: translateY(-1px); border-color: color-mix(in oklch, var(--accent) 30%, var(--line)); box-shadow: 0 10px 30px rgba(0,0,0,.07), 0 1px 0 rgba(255,255,255,.72) inset; }
textarea.field { min-height: 110px; resize: vertical; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 750; }
label:focus-within { color: color-mix(in oklch, var(--accent) 78%, var(--ink)); }

.table {
  overflow: hidden;
  border-radius: 16px;
  background: color-mix(in oklch, var(--surface) 70%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset;
}
.table tr { transform: translateZ(0); }
.table tr:hover td { transform: translateX(3px); }
.table td:first-child, .table th:first-child { padding-left: 16px; }

.pill {
  transition: transform .22s var(--fx-curve), box-shadow .22s ease, border-color .22s ease, filter .22s ease;
}
.pill:hover { transform: translateY(-2px) scale(1.03); filter: saturate(1.1); }
.pill.hot { animation: hot-pulse 2.8s ease-in-out infinite; }

.stat strong, .kpi b, .price {
  text-shadow: 0 0 24px rgba(240,80,48,.12);
  transition: transform .24s var(--fx-curve), text-shadow .24s ease;
}
.stat:hover strong, .kpi:hover b, .product:hover .price { transform: translateY(-2px) scale(1.03); text-shadow: 0 0 26px rgba(240,80,48,.24); }

.chart-bars span { position: relative; overflow: hidden; }
.chart-bars span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, transparent, rgba(255,255,255,.62), transparent);
  transform: translateY(100%);
  animation: chart-shine 2.8s ease-in-out infinite;
  animation-delay: inherit;
}

.footer {
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 82px);
  animation: footer-scan 14s linear infinite;
  pointer-events: none;
}
.footer .container { position: relative; z-index: 1; }

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(37,211,102,.24), transparent 62%);
  animation: whatsapp-ring 2.4s ease-in-out infinite;
  z-index: -1;
}

.fx-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  transform: translate(-50%, 22px) scale(.96);
  opacity: 0;
  min-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, rgba(12,12,12,.92), rgba(48,15,9,.94));
  box-shadow: 0 24px 70px rgba(0,0,0,.28), 0 0 32px rgba(240,80,48,.20);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(18px);
  transition: opacity .28s ease, transform .28s var(--fx-curve);
}
.fx-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

@keyframes premium-bg-pan {
  0% { background-position: 0% 0%, 100% 0%, 0 0; }
  100% { background-position: 100% 18%, 0% 28%, 0 0; }
}
@keyframes blueprint-slide {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 120px 0, -100px 0, 96px 0, 0 96px; }
}
@keyframes aurora-shift {
  0% { transform: scale(1) rotate(0deg); filter: hue-rotate(0deg); }
  100% { transform: scale(1.04) rotate(1deg); filter: hue-rotate(-6deg); }
}
@keyframes title-shimmer {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
@keyframes char-rise {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes section-line {
  0%, 100% { transform: translateX(-50%) scaleX(.35); opacity: .28; }
  50% { transform: translateX(-50%) scaleX(1); opacity: .8; }
}
@keyframes media-orbit {
  to { transform: rotate(360deg); }
}
@keyframes ripple-pop {
  to { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}
@keyframes hot-pulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(240,80,48,.22); }
  50% { box-shadow: 0 14px 34px rgba(240,80,48,.36); }
}
@keyframes chart-shine {
  0%, 55% { transform: translateY(100%); opacity: .2; }
  100% { transform: translateY(-100%); opacity: .85; }
}
@keyframes footer-scan {
  from { transform: translateX(-22%); }
  to { transform: translateX(22%); }
}
@keyframes whatsapp-ring {
  0%, 100% { transform: scale(.92); opacity: .72; }
  50% { transform: scale(1.14); opacity: 1; }
}

@media (max-width: 980px) {
  .fx-spotlight { opacity: .28; }
  .fx-canvas { opacity: .52; }
  h1 .char, h2 .char { animation-delay: calc(var(--char-index, 0) * 8ms + 80ms); }
}

@media (max-width: 560px) {
  .fx-grid-glow, .fx-noise { opacity: .35; }
  .fx-spotlight { display: none; }
  .card.tilt-ready:hover, .product.tilt-ready:hover, .black-panel.tilt-ready:hover, .device-card.tilt-ready:hover {
    transform: translateY(-3px);
  }
  .section::after { display: none; }
  h1 .char, h2 .char { opacity: 1; transform: none; animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-canvas, .fx-spotlight, .fx-grid-glow, .fx-noise, .scroll-progress { display: none !important; }
  .fx-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  h1 .char, h2 .char { opacity: 1 !important; transform: none !important; animation: none !important; }
}

.fx-soft-border {
  box-shadow: 0 1px 0 rgba(255,255,255,.48) inset, 0 0 0 1px rgba(240,80,48,0);
}
.fx-soft-border:hover, .fx-soft-border:focus {
  box-shadow: var(--shadow), 0 0 0 1px rgba(240,80,48,.18), 0 0 28px rgba(240,80,48,.10);
}
.field.fx-soft-border:hover, .field.fx-soft-border:focus {
  box-shadow: 0 0 0 4px rgba(240,80,48,.12), 0 12px 34px rgba(0,0,0,.08), 0 1px 0 rgba(255,255,255,.72) inset;
}


/* =========================================================
   FIX LANDING - TEXTO LEGIBLE EN TARJETAS CLARAS DEL HERO
   ========================================================= */

.black-panel .device-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(245,247,250,.94)),
    radial-gradient(circle at top right, rgba(240,80,48,.10), transparent 42%);
  color: var(--ink);
}

.black-panel .device-card h3 {
  color: var(--ink);
  text-shadow: none;
}

.black-panel .device-card .device-copy,
.black-panel .device-card p {
  color: #3f4652;
  font-weight: 600;
  line-height: 1.55;
  text-shadow: none;
}

.black-panel .device-card:hover .device-copy,
.black-panel .device-card:hover p {
  color: #20242b;
}

.black-panel .device-card .pill {
  color: inherit;
}

.black-panel .device-card .pill.hot {
  color: #fff;
}

.black-panel .device-card .pill.ok {
  color: oklch(35% .12 145);
}

/* =========================================================
   CATALOGO - SELECTOR DE CANTIDAD PREMIUM
   ========================================================= */

.product-buy {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.qty-box {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklch, var(--line) 76%, white);
  background:
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(248,249,252,.78)),
    radial-gradient(circle at top right, rgba(240,80,48,.12), transparent 44%);
  box-shadow:
    0 12px 28px rgba(17, 24, 39, .08),
    inset 0 1px 0 rgba(255,255,255,.85);
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: white;
  font-size: 19px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow:
    0 10px 22px rgba(240,80,48,.25),
    inset 0 1px 0 rgba(255,255,255,.22);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.qty-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    0 14px 30px rgba(240,80,48,.34),
    0 0 24px rgba(240,80,48,.18);
  filter: saturate(1.1);
}

.qty-btn:active {
  transform: translateY(0) scale(.95);
}

.qty-input {
  width: 68px;
  height: 34px;
  border: 0;
  outline: none;
  text-align: center;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 900;
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(15,23,42,.08),
    inset 0 1px 3px rgba(15,23,42,.08);
}

.qty-input:focus {
  box-shadow:
    inset 0 0 0 2px color-mix(in oklch, var(--accent) 58%, white),
    0 0 0 4px color-mix(in oklch, var(--accent) 16%, transparent);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input[type="number"] {
  -moz-appearance: textfield;
}

.add-cart-btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 700px) {
  .product-buy {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .product-buy .add-cart-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .qty-box,
  .add-cart-btn {
    width: 100%;
  }

  .qty-box {
    justify-content: space-between;
  }

  .qty-input {
    flex: 1;
  }
}

/* =========================================================
   FIX GLOBAL - H1 CORTADOS / TEXTO PEGADO AL SIGUIENTE BLOQUE
   ========================================================= */

h1,
.section h1,
.container h1 {
  line-height: 1.12;
  overflow: visible;
  padding-bottom: 0.14em;
  margin-bottom: 22px;
}

h1 span,
.section h1 span,
.container h1 span {
  line-height: inherit;
  overflow: visible;
}

.lead {
  margin-top: 0;
}

/* Cuando el H1 esté seguido de texto, toolbar o filtros */
h1 + p,
h1 + .lead,
h1 + .toolbar,
h1 + .grid,
h1 + .card {
  margin-top: 18px;
}

/* Evita que las animaciones corten letras como g, j, p, y */
[data-reveal],
.reveal,
.reveal-text,
.split-text,
.motion-text {
  overflow: visible;
}

/* Responsive: en celular necesita más aire */
@media (max-width: 768px) {
  h1,
  .section h1,
  .container h1 {
    line-height: 1.16;
    padding-bottom: 0.18em;
    margin-bottom: 24px;
  }

  h1 + p,
  h1 + .lead,
  h1 + .toolbar {
    margin-top: 20px;
  }
}

/* =========================================================
   COTIZADOR PROFESIONAL
   ========================================================= */

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
  gap: 28px;
  align-items: start;
  margin-top: 26px;
}

.quote-form {
  gap: 26px;
}

.quote-block {
  position: relative;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid color-mix(in oklch, var(--line) 76%, white);
  background:
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(248,250,252,.68)),
    radial-gradient(circle at top right, rgba(240,80,48,.08), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    0 18px 44px rgba(15,23,42,.06);
  overflow: hidden;
}

.quote-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
  transform: translateX(-120%);
  transition: transform .7s ease;
}

.quote-block:hover::before {
  transform: translateX(120%);
}

.quote-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.quote-title-row h2 {
  margin: 6px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.quote-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid color-mix(in oklch, var(--line) 78%, white);
  background: rgba(255,255,255,.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 14px 34px rgba(15,23,42,.06);
}

.quote-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.quote-table th,
.quote-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid rgba(15,23,42,.08);
  vertical-align: middle;
}

.quote-table th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background:
    linear-gradient(135deg, rgba(15,23,42,.04), rgba(240,80,48,.05));
}

.quote-table tr {
  transition:
    background .2s ease,
    transform .2s ease;
}

.quote-table tbody tr:hover {
  background: rgba(240,80,48,.045);
}

.quote-product-select {
  min-width: 260px;
}

.quote-qty {
  width: 95px;
}

.quote-unit {
  min-width: 120px;
}

.quote-remove {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: white;
  font-size: 22px;
  font-weight: 900;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.32), transparent 35%),
    linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow:
    0 12px 28px rgba(239,68,68,.28),
    inset 0 1px 0 rgba(255,255,255,.24);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.quote-remove:hover {
  transform: translateY(-2px) rotate(8deg) scale(1.04);
  box-shadow:
    0 16px 34px rgba(239,68,68,.34),
    0 0 24px rgba(239,68,68,.16);
  filter: saturate(1.12);
}

.quote-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.quote-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-summary {
  position: sticky;
  top: 98px;
}

.quote-output-panel {
  display: grid;
  gap: 18px;
}

.quote-output-panel h2 {
  margin: 0;
  color: white;
}

.quote-mini-list {
  display: grid;
  gap: 8px;
}

.quote-mini-list h3 {
  margin: 0 0 4px;
  color: white;
}

.quote-mini-list p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: rgba(255,255,255,.78);
  line-height: 1.5;
}

.quote-mini-list p strong {
  color: white;
}

.quote-total-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.06)),
    radial-gradient(circle at top right, rgba(240,80,48,.28), transparent 44%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 16px 36px rgba(0,0,0,.18);
}

.quote-total-card span {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.quote-total-card strong {
  display: block;
  color: white;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
}

.quote-total-card small {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.62);
  line-height: 1.45;
}

.quote-total-card.soft p {
  display: block;
  color: rgba(255,255,255,.76);
  margin: 8px 0 0;
}

.quote-total-card.soft strong {
  display: inline;
  font-size: inherit;
}

.quote-whatsapp {
  width: 100%;
  justify-content: center;
}

@media (max-width: 980px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-summary {
    position: relative;
    top: auto;
  }
}

@media (max-width: 640px) {
  .quote-block {
    padding: 18px;
    border-radius: 22px;
  }

  .quote-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-title-row .btn {
    width: 100%;
    justify-content: center;
  }

  .quote-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   COTIZADOR FUNCIONAL TIPO DEMO REAL
   ========================================================= */

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
  gap: 28px;
  align-items: start;
  margin-top: 26px;
}

.quote-form {
  gap: 26px;
}

.quote-block {
  position: relative;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid color-mix(in oklch, var(--line) 76%, white);
  background:
    linear-gradient(145deg, rgba(255,255,255,.86), rgba(248,250,252,.70)),
    radial-gradient(circle at top right, rgba(240,80,48,.08), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    0 18px 44px rgba(15,23,42,.06);
  overflow: hidden;
}

.quote-block::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  transform: translateX(-120%);
  transition: transform .7s ease;
}

.quote-block:hover::before {
  transform: translateX(120%);
}

.quote-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.quote-title-row h2 {
  margin: 6px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.quote-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid color-mix(in oklch, var(--line) 78%, white);
  background: rgba(255,255,255,.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 14px 34px rgba(15,23,42,.06);
}

.quote-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.quote-table th,
.quote-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid rgba(15,23,42,.08);
  vertical-align: middle;
}

.quote-table th {
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background:
    linear-gradient(135deg, rgba(15,23,42,.04), rgba(240,80,48,.05));
}

.quote-table tbody tr {
  transition:
    background .2s ease,
    transform .2s ease;
}

.quote-table tbody tr:hover {
  background: rgba(240,80,48,.045);
}

.quote-product-select {
  min-width: 240px;
}

.quote-detail {
  min-width: 210px;
}

.quote-qty {
  width: 95px;
}

.quote-unit {
  min-width: 120px;
}

.quote-price {
  width: 110px;
}

.quote-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.quote-remove {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: white;
  font-size: 22px;
  font-weight: 900;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.32), transparent 35%),
    linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow:
    0 12px 28px rgba(239,68,68,.28),
    inset 0 1px 0 rgba(255,255,255,.24);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.quote-remove:hover {
  transform: translateY(-2px) rotate(8deg) scale(1.04);
  box-shadow:
    0 16px 34px rgba(239,68,68,.34),
    0 0 24px rgba(239,68,68,.16);
  filter: saturate(1.12);
}

.quote-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.quote-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-summary {
  position: sticky;
  top: 98px;
}

.quote-output-panel {
  display: grid;
  gap: 18px;
}

.quote-output-panel h2 {
  margin: 0;
  color: white;
}

.quote-mini-list {
  display: grid;
  gap: 8px;
}

.quote-mini-list h3 {
  margin: 0 0 4px;
  color: white;
}

.quote-mini-list p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: rgba(255,255,255,.78);
  line-height: 1.5;
}

.quote-mini-list p span {
  display: grid;
  gap: 2px;
}

.quote-mini-list p small {
  display: block;
  color: rgba(255,255,255,.54);
  font-size: .78rem;
}

.quote-mini-list p strong {
  color: white;
  white-space: nowrap;
}

.quote-total-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.06)),
    radial-gradient(circle at top right, rgba(240,80,48,.28), transparent 44%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 16px 36px rgba(0,0,0,.18);
}

.quote-total-card span {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.quote-total-card strong {
  display: block;
  color: white;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
}

.quote-total-card small {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.62);
  line-height: 1.45;
}

.quote-total-card.soft p {
  display: block;
  color: rgba(255,255,255,.76);
  margin: 8px 0 0;
}

.quote-total-card.soft strong {
  display: inline;
  font-size: inherit;
}

.quote-breakdown {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}

.quote-breakdown p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  color: rgba(255,255,255,.72);
}

.quote-breakdown p strong {
  color: white;
}

.quote-breakdown-total {
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.13);
  font-size: 1.08rem;
}

.quote-breakdown-total span,
.quote-breakdown-total strong {
  color: white;
}

.quote-whatsapp {
  width: 100%;
  justify-content: center;
}

@media (max-width: 980px) {
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .quote-summary {
    position: relative;
    top: auto;
  }
}

@media (max-width: 640px) {
  .quote-block {
    padding: 18px;
    border-radius: 22px;
  }

  .quote-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-title-row .btn,
  .quote-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   HEADER - LOGO MÁS GRANDE Y VISIBLE
   ========================================================= */

.brand {
  gap: 14px;
}

.brand img {
  width: 98px;
  height: 98px;
  min-width: 98px;
  object-fit: contain;
  border-radius: 18px;
  padding: 6px;
  background: rgba(255,255,255,.92);
  box-shadow:
    0 12px 30px rgba(15,23,42,.16),
    0 0 24px rgba(240,80,48,.16),
    inset 0 1px 0 rgba(255,255,255,.85);
  transition:
    transform .25s ease,
    box-shadow .25s ease,
    filter .25s ease;
}

.brand:hover img {
  transform: scale(1.06) rotate(-1deg);
  box-shadow:
    0 16px 36px rgba(15,23,42,.22),
    0 0 32px rgba(240,80,48,.24);
  filter: saturate(1.1) contrast(1.04);
}

.topbar {
  min-height: 96px;
  align-items: center;
}

/* Para que el nombre de la empresa acompañe mejor al logo */
.brand strong {
  font-size: clamp(1rem, 1.4vw, 1.28rem);
}

.brand span span {
  font-size: .78rem;
}

/* Responsive */
@media (max-width: 760px) {
  .brand img {
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 16px;
  }

  .topbar {
    min-height: 82px;
  }

  .brand strong {
    font-size: .95rem;
  }

  .brand span span {
    font-size: .7rem;
  }
}

/* =========================================================
   FIX GLOBAL - H2 CORTADOS ABAJO
   ========================================================= */

h2,
.section h2,
.container h2,
.card h2,
.black-panel h2,
.quote-title-row h2,
.quote-output-panel h2 {
  line-height: 1.18;
  overflow: visible;
  padding-bottom: 0.16em;
  margin-bottom: 16px;
}

h2 span,
.section h2 span,
.container h2 span,
.card h2 span,
.black-panel h2 span {
  line-height: inherit;
  overflow: visible;
}

/* Evita que animaciones o efectos corten letras bajas como g, j, p, q, y */
h2 *,
.reveal-text *,
.split-text *,
.motion-text * {
  overflow: visible;
}

/* Cuando el h2 tenga algo justo debajo, le damos más aire */
h2 + p,
h2 + .lead,
h2 + .toolbar,
h2 + .grid,
h2 + .card,
h2 + .quote-table-wrap {
  margin-top: 14px;
}

/* En paneles oscuros también necesita aire abajo */
.black-panel h2 {
  padding-bottom: 0.2em;
}

/* Responsive */
@media (max-width: 768px) {
  h2,
  .section h2,
  .container h2,
  .card h2,
  .black-panel h2,
  .quote-title-row h2,
  .quote-output-panel h2 {
    line-height: 1.22;
    padding-bottom: 0.2em;
    margin-bottom: 18px;
  }
}