/* =====================================================
   BoraViralizar — Premium Design System v2
   ===================================================== */

/* --- Design Tokens --- */
:root {
  --bg:        #070710;
  --bg-soft:   #0c0c18;
  --card:      #0f0f1c;
  --line:      #1a1a28;
  --txt:       #eeeef4;
  --txt-soft:  #b0b0c6;
  --muted:     #80809a;
  --cyan:      #25f4ee;
  --pink:      #fe2c55;
  --green:     #3ad07a;
  --red:       #fe4d6a;
  --gold:      #ffc93c;
  --radius:    18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-std:  cubic-bezier(0.4, 0, 0.2, 1);
  /* v2 extended tokens */
  --glow-c:        rgba(37, 244, 238, .22);
  --glow-p:        rgba(254, 44, 85, .22);
  --surface-hi:    rgba(255, 255, 255, .048);
  --border-hi:     rgba(255, 255, 255, .08);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Fundo animado (aurora flutuante) --- */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(closest-side at 18% 28%, rgba(254,44,85,.22), transparent),
    radial-gradient(closest-side at 82% 18%, rgba(37,244,238,.20), transparent),
    radial-gradient(closest-side at 65% 82%, rgba(37,244,238,.14), transparent),
    radial-gradient(closest-side at 28% 78%, rgba(254,44,85,.16), transparent);
  filter: blur(50px);
  animation: bgDrift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

/* === FUNDO RADAR (anéis pulsando + varredura girando + produtos detectados) === */
.radar-bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none;
  display: grid; place-items: center;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, #000 35%, transparent 78%);
}
.radar-scene {
  position: relative;
  width: min(135vh, 135vw); height: min(135vh, 135vw);
  opacity: .55;
}
.rb-ring {
  position: absolute; inset: 0; margin: auto;
  border: 1px solid rgba(37,244,238,.10); border-radius: 50%;
}
.rb-ring:nth-of-type(1) { width: 28%; height: 28%; }
.rb-ring:nth-of-type(2) { width: 52%; height: 52%; }
.rb-ring:nth-of-type(3) { width: 76%; height: 76%; }
.rb-ring:nth-of-type(4) { width: 100%; height: 100%; border-color: rgba(37,244,238,.07); }
.rb-cross { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; }
.rb-cross::before, .rb-cross::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: rgba(37,244,238,.06);
}
.rb-cross::before { width: 1px; height: 100%; transform: translate(-50%,-50%); }
.rb-cross::after  { width: 100%; height: 1px; transform: translate(-50%,-50%); }
.rb-pulse {
  position: absolute; inset: 0; margin: auto; width: 28%; height: 28%;
  border: 1px solid rgba(37,244,238,.28); border-radius: 50%;
  animation: rbPulse 4.5s ease-out infinite;
}
.rb-sweep {
  position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(37,244,238,.18), rgba(37,244,238,.04) 38deg, transparent 90deg, transparent 360deg);
  transform-origin: 50% 50%;
  animation: rbSpin 7s linear infinite;
}
.rb-blips { position: absolute; inset: 0; }
.rb-blip {
  position: absolute; opacity: 0;
  filter: drop-shadow(0 0 7px rgba(37,244,238,.55));
  animation: rbBlip 3.4s ease-in-out forwards;
  will-change: opacity, transform;
}
@keyframes rbPulse {
  0%   { transform: scale(1);   opacity: .55; }
  100% { transform: scale(3.4); opacity: 0; }
}
@keyframes rbSpin { to { transform: rotate(360deg); } }
@keyframes rbBlip {
  0%   { opacity: 0;  transform: translate(-50%,-50%) scale(.4); }
  18%  { opacity: .95; transform: translate(-50%,-50%) scale(1); }
  70%  { opacity: .7;  transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0;  transform: translate(-50%,-50%) scale(.85); }
}

@keyframes bgDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  25%  { transform: translate3d(8%, -5%, 0) scale(1.12); }
  50%  { transform: translate3d(-3%, 7%, 0) scale(1.16); }
  75%  { transform: translate3d(-8%, -4%, 0) scale(1.1); }
  100% { transform: translate3d(5%, 5%, 0) scale(1.07); }
}
@keyframes gridSlide {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 46px 46px, 46px 46px; }
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; position: relative; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); font-size: .85rem; }
.tiny  { font-size: .7rem; }

/* --- Keyframes --- */
@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(37,244,238,.38), 0 0 0 1px rgba(37,244,238,.16); }
  50%       { box-shadow: 0 0 22px rgba(254,44,85,.44),  0 0 0 1px rgba(254,44,85,.22); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(37,244,238,.1),  0 0 0 1px rgba(37,244,238,.18); }
  50%       { box-shadow: 0 0 36px rgba(37,244,238,.22), 0 0 0 1px rgba(37,244,238,.3); }
}
@keyframes gradShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes radarSweep { to { transform: rotate(360deg); } }
@keyframes radarBlink {
  0%, 100% { opacity: 1; r: 2.4px; filter: drop-shadow(0 0 4px var(--pink)); }
  50%      { opacity: .15; r: 1.6px; }
}

/* ================================================
   TOPBAR
   ================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,7,16,.92);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid var(--line);
  box-shadow:
    0 1px 0 var(--border-hi),
    0 8px 32px rgba(0,0,0,.28);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.12rem; font-weight: 500; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #182638, #07090f);
  border-radius: 11px;
  flex-shrink: 0;
  overflow: hidden;
  animation: brandPulse 4s ease-in-out infinite;
}

/* --- Logo radar --- */
.radar { width: 100%; height: 100%; display: block; }
.radar-ring { fill: none; stroke: rgba(37,244,238,.38); stroke-width: 1; }
.radar-grid { stroke: rgba(37,244,238,.18); stroke-width: 1; }
.radar-sweep { transform-origin: 20px 20px; animation: radarSweep 2.6s linear infinite; }
.radar-sweep path { fill: rgba(37,244,238,.48); }
.radar-blip { fill: var(--pink); animation: radarBlink 1.3s ease-in-out infinite; }
.brand-name { letter-spacing: -.025em; }
.brand-name strong {
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800;
}

/* ================================================
   HERO
   ================================================ */
.hero {
  padding: 80px 0 52px;
  background:
    radial-gradient(ellipse 960px 560px at 88% -12%, rgba(254,44,85,.19), transparent),
    radial-gradient(ellipse 680px 500px at -4%  22%, rgba(37,244,238,.13), transparent),
    radial-gradient(ellipse 480px 340px at 50%  72%, rgba(37,244,238,.05), transparent);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(37,244,238,.06);
  border: 1px solid rgba(37,244,238,.26);
  color: var(--cyan);
  padding: 7px 18px;
  border-radius: 999px;
  font-size: .76rem; font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: .5px;
  animation: badgePulse 3.5s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -1.8px;
  max-width: 740px;
  line-height: 1.08;
  text-shadow: 0 0 80px rgba(37,244,238,.06);
}
.grad {
  background: linear-gradient(90deg, var(--cyan) 0%, var(--pink) 50%, var(--cyan) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShimmer 5s ease-in-out infinite;
}
.hero-sub {
  color: var(--txt-soft);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 20px 0 30px;
  line-height: 1.72;
}

/* Search bar */
.searchbar { display: flex; gap: 10px; max-width: 600px; }
.searchbar input {
  flex: 1;
  background: rgba(12,12,24,.85);
  border: 1px solid var(--line);
  border-top-color: var(--border-hi);
  color: var(--txt);
  padding: 15px 22px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .22s var(--ease-std), box-shadow .22s var(--ease-std), background .22s;
  box-shadow: 0 2px 10px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.03);
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(37,244,238,.16), 0 2px 14px rgba(0,0,0,.32);
  background: #0d0d1e;
}
.searchbar button {
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #000;
  border: none;
  font-family: inherit; font-weight: 800; font-size: .95rem;
  padding: 0 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: filter .22s, transform .22s var(--ease), box-shadow .22s;
  box-shadow: 0 4px 22px rgba(37,244,238,.28), inset 0 1px 0 rgba(255,255,255,.3);
  letter-spacing: .02em;
}
.searchbar button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(37,244,238,.4), 0 4px 14px rgba(254,44,85,.2);
}
.searchbar button:active { transform: translateY(0); filter: brightness(.97); box-shadow: none; }

/* Hero stats */
.stats { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.stats .stat {
  background: linear-gradient(150deg, var(--surface-hi), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-top: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  min-width: 116px;
  position: relative;
  overflow: hidden;
  transition: border-color .28s, transform .32s var(--ease), box-shadow .28s;
}
.stats .stat::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.stats .stat:hover {
  border-color: rgba(37,244,238,.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.36);
}
.stats .stat:hover::after { opacity: .65; }
.stats .stat b {
  display: block;
  font-size: 1.6rem; font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1;
  color: var(--txt);
  font-feature-settings: 'tnum' 1;
}
.stats .stat span { color: var(--muted); font-size: .73rem; display: block; margin-top: 4px; letter-spacing: .02em; }

/* ================================================
   CONTENT SECTION
   ================================================ */
.section { padding: 32px 0 72px; }

/* ================================================
   FILTERBAR
   ================================================ */
.filterbar {
  display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end;
  background: linear-gradient(160deg, rgba(15,15,28,.92), rgba(10,10,20,.96));
  border: 1px solid var(--line);
  border-top: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow:
    0 8px 40px rgba(0,0,0,.38),
    0 2px 8px rgba(0,0,0,.2),
    inset 0 1px 0 var(--surface-hi);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group > label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
}

/* Chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: rgba(255,255,255,.032);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: .79rem; font-family: inherit;
  cursor: pointer;
  transition: color .18s, border-color .2s, background .2s, transform .22s var(--ease), box-shadow .2s;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
}
.chip:hover {
  color: var(--txt);
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.07);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.06);
}
.chip:active { transform: translateY(0); }
.chip.active {
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #000; border-color: transparent; font-weight: 700;
  box-shadow:
    0 4px 20px rgba(37,244,238,.3),
    0 2px 10px rgba(254,44,85,.18),
    inset 0 1px 0 rgba(255,255,255,.36);
  transform: none;
}
.chip.star.active {
  background: linear-gradient(135deg, var(--gold), #ff9d2c);
  box-shadow: 0 4px 20px rgba(255,201,60,.32), inset 0 1px 0 rgba(255,255,255,.3);
}
.chip.toggle.active {
  background: var(--txt); color: #000;
  border-color: transparent; font-weight: 700;
  box-shadow: 0 4px 20px rgba(237,237,242,.2), inset 0 1px 0 rgba(255,255,255,.4);
}

/* Select elements */
.filter-group select {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--txt);
  padding: 8px 34px 8px 14px;
  border-radius: 999px;
  font-size: .79rem; font-family: inherit; font-weight: 500;
  cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' fill='none'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%2386869a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.03);
}
.filter-group select:hover {
  border-color: rgba(255,255,255,.16);
  background-color: rgba(255,255,255,.03);
}
.filter-group select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(37,244,238,.14), 0 1px 3px rgba(0,0,0,.28);
}

/* Result info row */
.result-info {
  display: flex; gap: 10px; align-items: center;
  margin: 6px 2px 22px;
  font-size: .82rem; color: var(--muted);
}
#resultCount { font-weight: 700; color: var(--txt); font-size: .86rem; }

/* ================================================
   PRODUCT GRID
   ================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ================================================
   CARDS
   ================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 1px solid rgba(255,255,255,.055);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  animation: cardIn .44s var(--ease) both;
  will-change: transform;
  position: relative;
  isolation: isolate;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
/* Staggered entrance — first 8 cards */
.card:nth-child(1) { animation-delay:   0ms; }
.card:nth-child(2) { animation-delay:  50ms; }
.card:nth-child(3) { animation-delay: 100ms; }
.card:nth-child(4) { animation-delay: 150ms; }
.card:nth-child(5) { animation-delay: 200ms; }
.card:nth-child(6) { animation-delay: 250ms; }
.card:nth-child(7) { animation-delay: 300ms; }
.card:nth-child(8) { animation-delay: 350ms; }

.card:hover {
  transform: translateY(-10px) scale(1.008);
  border-color: rgba(37,244,238,.42);
  border-top-color: rgba(37,244,238,.52);
  box-shadow:
    0 40px 100px rgba(0,0,0,.82),
    0 16px 40px rgba(0,0,0,.5),
    0 0 0 1px rgba(37,244,238,.14),
    0 0 64px rgba(37,244,238,.06);
}

/* Card image area */
.card-img {
  aspect-ratio: 1 / 1;
  position: relative;
  display: grid; place-items: center;
  font-size: 3.6rem;
  overflow: hidden;
  background: linear-gradient(150deg, #141426, #0d0d1c);
}
/* Bottom-vignette for smooth blend into card body */
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 42%, rgba(15,15,28,.78) 100%);
  pointer-events: none;
  z-index: 1;
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s var(--ease);
}
.card:hover .card-img img { transform: scale(1.09); }
.card-emoji {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  transition: transform .35s var(--ease);
}
.card:hover .card-emoji { transform: scale(1.11); }

/* Rank badge */
.card-rank {
  position: absolute; top: 10px; right: 10px;
  background: rgba(7,7,16,.82);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  font-size: .64rem; font-weight: 800;
  padding: 4px 10px; border-radius: 8px;
  backdrop-filter: blur(8px) saturate(160%); -webkit-backdrop-filter: blur(8px) saturate(160%);
  z-index: 2; letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Badges */
.card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 5px; z-index: 2;
}
.badge {
  font-size: .61rem; font-weight: 800;
  padding: 3px 9px; border-radius: 7px;
  width: fit-content;
  letter-spacing: .5px; text-transform: uppercase;
}
.badge.flash  { background: var(--pink);  color: #fff;    box-shadow: 0 2px 14px rgba(254,44,85,.52); }
.badge.rising { background: var(--green); color: #021406; box-shadow: 0 2px 14px rgba(58,208,122,.44); }
.badge.ideal  { background: var(--gold);  color: #1a1000; box-shadow: 0 2px 14px rgba(255,201,60,.38); }
.badge.sat    { background: rgba(48,48,62,.9); color: #a8a8be; backdrop-filter: blur(6px); }

/* Card content */
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat  { color: var(--cyan); font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.card-title {
  font-size: .92rem; font-weight: 600; line-height: 1.38;
  min-height: 2.5em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--txt);
}

/* Sparkline chart area */
.card-chart {
  position: relative;
  height: 52px; margin: 2px 0;
  background: rgba(0,0,0,.34);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.32);
}
.spark { width: 100%; height: 100%; display: block; }
.prev-tag {
  position: absolute; top: 4px; right: 4px;
  background: rgba(255,201,60,.1);
  border: 1px solid rgba(255,201,60,.2);
  color: var(--gold);
  font-size: .55rem; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  backdrop-filter: blur(4px);
  letter-spacing: .3px;
}

/* Card meta row */
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: .77rem; margin-top: 2px;
}
.card-meta .up   { color: var(--green); font-weight: 700; }
.card-meta .down { color: var(--red);   font-weight: 700; }

/* Price row */
.card-price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 2px; }
.card-price {
  font-size: 1.16rem; font-weight: 800; letter-spacing: -.04em;
  font-feature-settings: 'tnum' 1;
}
.disc {
  font-size: .66rem; color: var(--pink); font-weight: 800;
  vertical-align: middle; margin-left: 5px;
  background: rgba(254,44,85,.12);
  border: 1px solid rgba(254,44,85,.22);
  padding: 1px 6px; border-radius: 5px;
}
.card-rating { color: var(--gold); font-size: .83rem; font-weight: 600; }

/* Card CTA button — gradient reveal via pseudo-element */
.card-btn {
  margin-top: 8px; text-align: center;
  background: rgba(255,255,255,.042);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--txt-soft);
  font-family: inherit; font-weight: 600;
  padding: 10px; border-radius: var(--radius-xs);
  font-size: .83rem; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .22s, border-color .22s, box-shadow .22s, font-weight .01s;
  letter-spacing: .01em;
}
.card-btn::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  opacity: 0;
  transition: opacity .25s var(--ease-std);
}
.card-btn:hover::before { opacity: 1; }
.card-btn:hover {
  color: #000; border-color: transparent; font-weight: 700;
  box-shadow: 0 4px 22px rgba(37,244,238,.28), 0 2px 10px rgba(254,44,85,.16);
}
.card-btn:active { transform: scale(.985); }

/* Empty state */
.empty { text-align: center; color: var(--muted); padding: 80px 20px; font-size: 1rem; }

/* ================================================
   MODAL
   ================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  animation: backdropIn .24s ease both;
}
/* CRITICAL — keep this rule intact */
.modal-backdrop[hidden] { display: none; }

.modal {
  background: linear-gradient(160deg, #0f0f1e, #090912);
  border: 1px solid rgba(255,255,255,.07);
  border-top: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  max-width: 660px; width: 100%;
  max-height: 90vh; overflow: auto;
  position: relative; padding: 32px;
  animation: modalIn .36s var(--ease) both;
  box-shadow:
    0 64px 160px rgba(0,0,0,.92),
    0 24px 64px rgba(0,0,0,.65),
    0 0 0 1px rgba(255,255,255,.04),
    inset 0 1px 0 rgba(255,255,255,.07);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  width: 38px; height: 38px;
  border-radius: 10px; cursor: pointer; font-size: .88rem;
  display: grid; place-items: center;
  transition: background .2s, color .2s, border-color .2s, transform .28s var(--ease), box-shadow .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.modal-close:hover {
  background: var(--pink); color: #fff; border-color: var(--pink);
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 4px 18px rgba(254,44,85,.42);
}

/* Modal header */
.mc-head {
  display: flex; gap: 20px; margin-bottom: 26px;
  padding-right: 42px; align-items: flex-start;
}
.mc-img {
  width: 96px; height: 96px; border-radius: 16px;
  overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center; font-size: 2.6rem;
  background: linear-gradient(150deg, #141428, #0c0c1e);
  border: 1px solid var(--border-hi);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.mc-img img { width: 100%; height: 100%; object-fit: cover; }
.mc-head h2 { font-size: 1.1rem; font-weight: 700; margin: 6px 0 12px; line-height: 1.34; color: var(--txt); }
.mc-badges  { display: flex; gap: 6px; flex-wrap: wrap; }

/* Modal chart */
.mc-chart {
  background: linear-gradient(160deg, rgba(0,0,0,.42), rgba(0,0,0,.26));
  border: 1px solid var(--line);
  border-top: 1px solid var(--border-hi);
  border-radius: 16px; padding: 18px 16px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 4px 16px rgba(0,0,0,.2);
}
.mc-chart-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; font-weight: 600; color: var(--txt-soft);
  margin-bottom: 12px;
}
.bigchart { width: 100%; height: auto; display: block; }

/* Metrics grid */
.mc-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
.m {
  background: linear-gradient(150deg, rgba(255,255,255,.038), rgba(255,255,255,.016));
  border: 1px solid var(--line);
  border-top: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color .22s, transform .28s var(--ease), box-shadow .22s;
  position: relative;
  overflow: hidden;
}
.m::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,244,238,.05), transparent);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.m:hover {
  border-color: rgba(37,244,238,.24);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.m:hover::before { opacity: 1; }
.m-l { font-size: .64rem; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.m-v { font-size: 1.08rem; font-weight: 700; color: var(--txt); font-feature-settings: 'tnum' 1; }
.m-v.pos { color: var(--green); }
.m-v.neg { color: var(--red); }

/* Modal CTA */
.mc-cta {
  display: block; text-align: center;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #000; font-weight: 800; font-size: .97rem;
  padding: 15px; border-radius: var(--radius-sm);
  transition: filter .22s, box-shadow .25s, transform .25s var(--ease);
  box-shadow:
    0 6px 28px rgba(37,244,238,.3),
    0 3px 14px rgba(254,44,85,.2),
    inset 0 1px 0 rgba(255,255,255,.28);
  letter-spacing: .015em;
}
.mc-cta:hover {
  filter: brightness(1.1);
  box-shadow: 0 10px 44px rgba(37,244,238,.44), 0 6px 22px rgba(254,44,85,.28);
  transform: translateY(-2px);
}
.mc-cta:active { transform: translateY(0); filter: brightness(.97); }

/* ================================================
   FOOTER
   ================================================ */
.footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 12px; }
.footer .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; color: var(--muted); font-size: .8rem;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 640px) {
  .hero { padding: 52px 0 32px; }
  .hero h1 { letter-spacing: -1.2px; }
  .stats { gap: 10px; }
  .stats .stat { padding: 12px 16px; flex: 1 1 120px; }
  .searchbar { flex-direction: column; }
  .searchbar button { padding: 15px; }
  .filterbar { gap: 14px; padding: 16px 18px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .mc-metrics { grid-template-columns: 1fr 1fr; }
  .modal { padding: 24px 20px; border-radius: 18px; }
  .mc-head { gap: 16px; }
  .mc-img { width: 76px; height: 76px; }
}

@media (max-width: 400px) {
  .mc-metrics { grid-template-columns: 1fr; }
  .stats .stat { flex: 1 1 100%; }
  .product-grid { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .mc-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================
   MOTION PREFERENCES
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  .rb-sweep, .rb-pulse { animation: none; }
  .rb-blips { display: none; }
  .radar-sweep   { animation: none; }
  .radar-blip    { animation: none; opacity: 1; }
  .brand-mark    { animation: none; box-shadow: 0 0 14px rgba(37,244,238,.3); }
  .hero-badge    { animation: none; box-shadow: 0 0 22px rgba(37,244,238,.12); }
  .grad          { animation: none; background-size: 100%; }
  .card          { animation: none; }
  .modal-backdrop { animation: none; }
  .modal         { animation: none; }
  .champ-item    { animation: none; }
}

/* ================================================
   ABAS DE VISÃO + PRODUTOS CAMPEÕES
   ================================================ */
.viewtabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 18px;
}
.vtab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit; font-size: .9rem; font-weight: 600;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}
.vtab:hover { color: var(--txt); }
.vtab.active {
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #000; font-weight: 700;
  box-shadow: 0 4px 18px rgba(37,244,238,.25);
}

.champ-toolbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 22px;
}
.champ-intro h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.4px; }
.champ-intro p  { max-width: 560px; margin-top: 6px; line-height: 1.55; font-size: .9rem; }
.champ-modeswitch .chip { font-size: .86rem; padding: 9px 16px; }

.champ-item { display: flex; flex-direction: column; }
.champ-item .card { flex: 1; }
.champ-reason {
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(37,244,238,.09), rgba(254,44,85,.07));
  border: 1px solid rgba(37,244,238,.18);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: .78rem;
  color: var(--txt-soft);
  line-height: 1.4;
}
