/* ============================================================
   ML Intel — Dashboard Inteligência Mercado Livre
   maxwp-pro: dark #070707 · headings #0c0c0c · red #8c2828 · blue #52b6ec
   ============================================================ */

/* Fix: tema maxwp-pro con font-family vacío */
body,
.entry-content,
.entry-title,
h1, h2, h3, h4, h5, h6,
.maxwp-nav-primary-menu a,
.maxwp-secondary-nav-menu a {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

:root {
  --ml-red:     #8c2828;
  --ml-red2:    #a33030;
  --ml-blue:    #52b6ec;
  --ml-blue2:   #3a9fd4;
  --ml-dark:    #0c0c0c;
  --ml-dark2:   #1a1a1a;
  --ml-dark3:   #232323;
  --ml-text:    #2c2c2c;
  --ml-muted:   #777;
  --ml-border:  #e2e2e2;
  --ml-bg:      #f5f5f5;
  --ml-card:    #ffffff;
  --ml-green:   #16a34a;
  --ml-yellow:  #d97706;
  --ml-radius:  8px;
  --ml-shadow:  0 2px 12px rgba(0,0,0,.07);
}

.ml-wrap { font-family: inherit; }

/* ── Breadcrumb ─────────────────────────────────────────── */

.ml-breadcrumb {
  font-size: .78rem;
  color: var(--ml-muted);
  margin-bottom: 1.25rem;
}

.ml-breadcrumb a {
  color: var(--ml-blue);
  text-decoration: none;
  font-weight: 600;
}

/* ── Hero (home) ────────────────────────────────────────── */

.ml-hero {
  background: linear-gradient(135deg, var(--ml-dark) 0%, #0d1a2e 100%);
  border-radius: var(--ml-radius);
  padding: 2rem 2rem 1.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.ml-hero::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 260px; height: 260px;
  background: var(--ml-blue);
  opacity: .04;
  border-radius: 50%;
}

.ml-hero__eyebrow {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.4);
  margin-bottom: .5rem;
}

.ml-hero__title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .6rem;
  line-height: 1.1;
}

.ml-hero__sub {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.ml-hero__kpis {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.ml-kpi {
  text-align: center;
}

.ml-kpi strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ml-kpi span {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.4);
  margin-top: .2rem;
}

.ml-kpi--accent strong { color: var(--ml-blue); }

/* Sparkline no hero */
.ml-mini-chart__label {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
  margin-bottom: .6rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ml-sparkline {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(82,182,236,.2));
}

/* ── Badges / Pills ─────────────────────────────────────── */

.ml-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .2rem .65rem;
  border-radius: 20px;
}

.ml-badge--red  { background: rgba(140,40,40,.12); color: var(--ml-red); border: 1px solid rgba(140,40,40,.25); }
.ml-badge--blue { background: rgba(82,182,236,.1); color: var(--ml-blue); border: 1px solid rgba(82,182,236,.25); }

/* ── Sections ───────────────────────────────────────────── */

.ml-section {
  background: var(--ml-card);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--ml-shadow);
}

.ml-section--dark {
  background: var(--ml-dark2) !important;
  border-color: #2a2a2a;
}

.ml-section--dark table,
.ml-section--dark .ml-table-wrap {
  background: transparent !important;
}

.ml-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.ml-section__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ml-dark);
  margin: 0 0 .2rem;
}

.ml-section__sub {
  font-size: .78rem;
  color: var(--ml-muted);
  margin: 0;
}

/* ── Tabelas ────────────────────────────────────────────── */

.ml-table-wrap { overflow-x: auto; }

.ml-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
}

.ml-table thead th {
  padding: .6rem 1rem;
  text-align: left;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ml-muted);
  background: var(--ml-bg);
  border-bottom: 2px solid var(--ml-border);
  white-space: nowrap;
}

.ml-table--dark thead th {
  background: rgba(255,255,255,.06) !important;
  color: rgba(255,255,255,.5) !important;
  border-bottom-color: #333 !important;
}

.ml-table tbody tr {
  border-bottom: 1px solid var(--ml-border);
  transition: background .15s;
}

.ml-table--dark tbody tr { border-bottom-color: #2c2c2c; }

.ml-table tbody tr:last-child { border-bottom: none; }
.ml-table tbody tr:hover { background: rgba(82,182,236,.04); }
.ml-table--dark tbody tr:hover { background: rgba(255,255,255,.04); }

.ml-table tbody td {
  padding: .75rem 1rem;
  color: var(--ml-text);
  vertical-align: middle;
}

.ml-table--dark tbody td,
.ml-table--dark tbody td strong,
.ml-table--dark tbody td span:not(.ml-score):not(.ml-comp):not(.ml-stock):not(.ml-up):not(.ml-down):not(.ml-stars):not(.ml-cat-tag):not(.ml-cta):not(.ml-seller-rep) {
  color: rgba(255,255,255,.85) !important;
  background: transparent !important;
}

.ml-table--dark tbody tr {
  background: transparent !important;
}

.ml-table--dark tbody tr:hover {
  background: rgba(255,255,255,.05) !important;
}

.ml-num {
  color: var(--ml-muted);
  font-weight: 700;
  font-size: .82rem;
  width: 28px;
}

/* ── Links de produto ───────────────────────────────────── */

.ml-prod-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none !important;
  color: inherit !important;
}

.ml-prod-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }

.ml-prod-name {
  font-size: .86rem;
  font-weight: 600;
  color: var(--ml-dark) !important;
  transition: color .15s;
  line-height: 1.3;
}

.ml-prod-link:hover .ml-prod-name { color: var(--ml-blue) !important; }
.ml-prod-link--dark .ml-prod-name { color: rgba(255,255,255,.9) !important; }
.ml-prod-link--dark:hover .ml-prod-name { color: var(--ml-blue) !important; }

/* ── Score ──────────────────────────────────────────────── */

.ml-score {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 4px;
}

.ml-score--hot  { background: rgba(140,40,40,.12); color: var(--ml-red); border: 1px solid rgba(140,40,40,.2); }
.ml-score--good { background: rgba(82,182,236,.1); color: var(--ml-blue2); border: 1px solid rgba(82,182,236,.2); }
.ml-score--low  { color: var(--ml-muted); font-weight: 400; }

/* ── Stock ──────────────────────────────────────────────── */

.ml-stock {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .55rem;
  border-radius: 4px;
}

.ml-stock--high { background: rgba(22,163,74,.1); color: var(--ml-green); }
.ml-stock--med  { background: rgba(217,119,6,.1);  color: var(--ml-yellow); }
.ml-stock--low  { background: rgba(140,40,40,.1);  color: var(--ml-red); }

/* ── Competição ─────────────────────────────────────────── */

.ml-comp {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 4px;
}

.ml-comp--low   { background: rgba(22,163,74,.1);  color: var(--ml-green); }
.ml-comp--med   { background: rgba(217,119,6,.1);  color: var(--ml-yellow); }
.ml-comp--high  { background: rgba(140,40,40,.1);  color: var(--ml-red); }
.ml-comp--vhigh { background: rgba(140,40,40,.15); color: var(--ml-red); font-weight: 700; }

/* ── Tendência ──────────────────────────────────────────── */

.ml-up   { color: var(--ml-green)  !important; font-weight: 700; }
.ml-down { color: var(--ml-red)    !important; font-weight: 700; }

/* ── Stars ──────────────────────────────────────────────── */

.ml-stars { color: #f59e0b; font-size: .8rem; }
.ml-stars + strong { font-weight: 700; font-size: .88rem; }

/* ── CTA small ──────────────────────────────────────────── */

.ml-cta {
  display: inline-block;
  background: var(--ml-blue);
  color: #fff !important;
  text-decoration: none !important;
  font-size: .73rem;
  font-weight: 700;
  padding: .3rem .7rem;
  border-radius: var(--ml-radius);
  transition: background .2s;
  white-space: nowrap;
}

.ml-cta:hover { background: var(--ml-blue2); }

/* ── Categoria tag ──────────────────────────────────────── */

.ml-cat-tag {
  font-size: .72rem;
  background: rgba(82,182,236,.08);
  color: var(--ml-blue2);
  border: 1px solid rgba(82,182,236,.2);
  padding: .15rem .5rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Seller ─────────────────────────────────────────────── */

.ml-seller { font-size: .8rem; }
.ml-seller-rep {
  background: rgba(22,163,74,.1);
  color: var(--ml-green);
  font-size: .68rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 4px;
}

/* ── Grid categorias ────────────────────────────────────── */

.ml-cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.ml-cats-grid--small { grid-template-columns: repeat(4, 1fr); }

.ml-cat-card {
  background: var(--ml-card);
  border: 1.5px solid var(--ml-border);
  border-radius: var(--ml-radius);
  padding: 1.25rem 1rem;
  text-decoration: none !important;
  color: var(--ml-text) !important;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  position: relative;
  overflow: hidden;
}

.ml-cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ml-blue);
  opacity: 0;
  transition: opacity .2s;
}

.ml-cat-card:hover {
  border-color: var(--ml-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(82,182,236,.15);
}

.ml-cat-card:hover::before { opacity: 1; }

.ml-cat-card__icon { font-size: 1.75rem; line-height: 1; }

.ml-cat-card__nome {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ml-dark);
  line-height: 1.2;
}

.ml-cat-card__stats {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.ml-cat-card__meta {
  display: flex;
  gap: .75rem;
  font-size: .73rem;
  color: var(--ml-muted);
  margin-top: .2rem;
  flex-wrap: wrap;
}

/* ── Footer ─────────────────────────────────────────────── */

.ml-footer {
  font-size: .72rem;
  color: var(--ml-muted);
  text-align: center;
  padding: .75rem 0;
  border-top: 1px solid var(--ml-border);
  margin-top: 0;
}

/* ── Produto: hero ──────────────────────────────────────── */

.ml-produto-hero {
  background: linear-gradient(135deg, var(--ml-dark) 0%, #0d1a2e 100%);
  border-radius: var(--ml-radius);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.ml-produto-hero__left { display: flex; align-items: center; gap: 1.25rem; }

.ml-produto-hero__icon { font-size: 3.5rem; line-height: 1; flex-shrink: 0; }

.ml-produto-hero__cat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.4);
  margin-bottom: .35rem;
}

.ml-produto-hero__titulo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .5rem;
  line-height: 1.2;
}

.ml-produto-hero__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
}

.ml-produto-hero__right { text-align: right; flex-shrink: 0; }

.ml-produto-hero__preco {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ml-produto-hero__tendencia {
  font-size: .88rem;
  margin: .35rem 0 .75rem;
}

/* ── Botão CTA grande ───────────────────────────────────── */

.ml-btn-cta {
  display: inline-block;
  background: var(--ml-red);
  color: #fff !important;
  text-decoration: none !important;
  font-size: .9rem;
  font-weight: 700;
  padding: .65rem 1.5rem;
  border-radius: var(--ml-radius);
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.ml-btn-cta:hover { background: var(--ml-red2); transform: translateY(-1px); }

/* ── Métricas grid ──────────────────────────────────────── */

.ml-metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ml-metrics--4 { grid-template-columns: repeat(4, 1fr); }

.ml-metric {
  background: var(--ml-card);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--ml-shadow);
}

.ml-metric span {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ml-muted);
  margin-bottom: .4rem;
}

.ml-metric strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ml-dark);
}

.ml-metric--accent { border-top: 3px solid var(--ml-red); }
.ml-metric--accent strong { color: var(--ml-red); }

/* ── Colunas produto ────────────────────────────────────── */

.ml-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.ml-col {
  background: var(--ml-card);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--ml-shadow);
}

.ml-col h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ml-dark);
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--ml-blue);
}

/* ── Chart histórico preço ──────────────────────────────── */

.ml-chart-wrap { margin-bottom: .75rem; }

.ml-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: .62rem;
  color: var(--ml-muted);
  margin-top: .35rem;
}

.ml-price-range {
  display: flex;
  gap: 1.25rem;
  font-size: .78rem;
  color: var(--ml-muted);
  margin-top: .25rem;
}

.ml-price-range strong { color: var(--ml-text); }

/* ── Detail table ───────────────────────────────────────── */

.ml-detail-table { width: 100%; border-collapse: collapse; font-size: .83rem; }

.ml-detail-table tr { border-bottom: 1px solid var(--ml-border); }
.ml-detail-table tr:last-child { border-bottom: none; }

.ml-detail-table td {
  padding: .55rem .25rem;
  color: var(--ml-text);
  vertical-align: middle;
}

.ml-detail-table td:first-child {
  color: var(--ml-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  width: 45%;
}

.ml-detail-table td:last-child { font-weight: 600; }

/* ── Score explain ──────────────────────────────────────── */

.ml-score-explain { margin-top: .75rem; }

.ml-score-formula {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  color: var(--ml-muted);
  margin-bottom: .4rem;
  flex-wrap: wrap;
}

.ml-score-calc {
  font-size: .88rem;
  color: var(--ml-text);
  margin-bottom: .6rem;
}

.ml-score-calc strong { font-size: 1.1rem; color: var(--ml-dark); }

.ml-score-tip {
  font-size: .78rem;
  color: var(--ml-muted);
  margin: .5rem 0 0;
  line-height: 1.5;
}

/* ── Reviews ────────────────────────────────────────────── */

.ml-reviews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.ml-review {
  background: var(--ml-bg);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  padding: .9rem 1rem;
}

.ml-review__stars { color: #f59e0b; font-size: .88rem; margin-bottom: .4rem; }

.ml-review__text {
  font-size: .82rem;
  color: var(--ml-text);
  line-height: 1.5;
  margin: 0 0 .4rem;
  font-style: italic;
}

.ml-review__autor { font-size: .72rem; color: var(--ml-muted); font-weight: 600; }

/* ── Categoria: hero ────────────────────────────────────── */

.ml-cat-hero {
  background: linear-gradient(135deg, var(--ml-dark) 0%, #0d1a2e 100%);
  border-radius: var(--ml-radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.ml-cat-hero__icon { font-size: 3rem; line-height: 1; flex-shrink: 0; }

.ml-cat-hero__info { flex: 1; }

.ml-cat-hero__titulo {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .5rem;
}

.ml-cat-hero__meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

.ml-cat-hero__right { text-align: right; flex-shrink: 0; }

.ml-cat-hero__preco {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ml-cat-hero__precolabel {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Trend bars (home) ──────────────────────────────────── */

.ml-trend-bars {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.ml-trend-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.ml-trend-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none !important;
  color: var(--ml-text) !important;
  font-size: .84rem;
  font-weight: 600;
  min-width: 170px;
  transition: color .15s;
}

.ml-trend-label:hover { color: var(--ml-blue) !important; }

.ml-trend-icon { font-size: 1.2rem; }

.ml-trend-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--ml-border);
  border-radius: 4px;
  overflow: hidden;
}

.ml-trend-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ml-blue2), var(--ml-blue));
  border-radius: 4px;
  transition: width .6s ease;
}

.ml-trend-val {
  min-width: 46px;
  text-align: right;
  font-size: .82rem;
  font-weight: 700;
}

/* ── Histograma ─────────────────────────────────────────── */

.ml-histogram {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  height: 120px;
  padding: 0 .5rem;
}

.ml-hist-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.ml-hist-bar__fill {
  width: 100%;
  background: var(--ml-blue);
  border-radius: 4px 4px 0 0;
  opacity: .75;
  transition: opacity .2s;
}

.ml-hist-bar:hover .ml-hist-bar__fill { opacity: 1; }

.ml-hist-bar__label {
  font-size: .65rem;
  color: var(--ml-muted);
  margin-top: .35rem;
  text-align: center;
  white-space: nowrap;
}

.ml-hist-bar__val {
  font-size: .7rem;
  font-weight: 700;
  color: var(--ml-blue2);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 960px) {
  .ml-hero          { grid-template-columns: 1fr; }
  .ml-hero__right   { display: none; }
  .ml-metrics       { grid-template-columns: repeat(3, 1fr); }
  .ml-cols          { grid-template-columns: 1fr; }
  .ml-cats-grid     { grid-template-columns: repeat(2, 1fr); }
  .ml-produto-hero  { flex-direction: column; align-items: flex-start; }
  .ml-produto-hero__right { text-align: left; }
  .ml-cat-hero      { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .ml-metrics       { grid-template-columns: repeat(2, 1fr); }
  .ml-reviews       { grid-template-columns: 1fr; }
  .ml-histogram     { height: 90px; }
  .ml-hist-bar__label { display: none; }
}
