/* =============================================
   AFILIADOS — CSS Complementar
============================================= */

/* ── GRID DE PLANOS ────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.plan-card {
  background: #000;
  padding: 28px 20px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--t);
  overflow: hidden;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255,255,255,.04), transparent 70%);
  opacity: 0;
  transition: var(--t);
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-card:hover {
  background: rgba(255,255,255,.016);
}

/* destaque */
.plan-featured {
  border-left: 1px solid rgba(255,255,255,.12);
  border-right: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.012);
}

.plan-featured-badge {
  position: absolute;
  top: 12px;
  right: -26px;
  background: #fff;
  color: #000;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 28px;
  transform: rotate(45deg);
  z-index: 1;
}

/* pixel decor */
.plan-px-decor {
  display: grid;
  grid-template-columns: repeat(4, 5px);
  grid-template-rows: repeat(2, 5px);
  gap: 2px;
  margin-bottom: 16px;
  opacity: .06;
}

.plan-px-decor span {
  border-radius: 1px;
  background: #fff;
}

.plan-header {
  margin-bottom: 12px;
}

.plan-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin-bottom: 4px;
  color: #fff;
}

.plan-credits {
  font-size: 11px;
  font-weight: 500;
  color: #555;
  letter-spacing: .5px;
}

.plan-price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.plan-price-usd {
  font-size: 11px;
  font-weight: 400;
  color: #444;
  letter-spacing: 0;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(255,255,255,.5);
  line-height: 1.4;
}

.plan-features li svg {
  width: 12px;
  height: 12px;
  color: rgba(255,255,255,.2);
  flex-shrink: 0;
}

.plan-commission {
  padding: 14px;
  border-radius: 10px;
  background: rgba(74,222,128,.04);
  border: 1px solid rgba(74,222,128,.1);
  text-align: center;
}

.plan-commission-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #3a3a3a;
  margin-bottom: 4px;
}

.plan-commission-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  color: rgba(130,220,130,.8);
}

/* ── SIMULADOR ────────────────────────────── */
.sim-field {
  margin-bottom: 20px;
}

.sim-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  margin-bottom: 8px;
}

.sim-slider-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sim-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.08);
  outline: none;
  cursor: pointer;
}

.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #000;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,255,255,.2);
}

.sim-slider-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  min-width: 40px;
  text-align: center;
}

/* distribuição */
.sim-distribution {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.sim-dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-dist-plan {
  font-size: 11px;
  color: #555;
  min-width: 150px;
  flex-shrink: 0;
}

.sim-dist-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.06);
  outline: none;
  cursor: pointer;
}

.sim-dist-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #000;
  cursor: pointer;
}

.sim-dist-pct {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  min-width: 32px;
  text-align: right;
}

.sim-total-bar {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: #555;
  transition: var(--t);
}

.sim-total-bar.ok {
  color: rgba(130,220,130,.7);
  border-color: rgba(74,222,128,.15);
}

.sim-total-bar.error {
  color: rgba(255,100,100,.7);
  border-color: rgba(255,70,70,.2);
}

.sim-total-bar span {
  font-weight: 800;
  color: #fff;
}

/* resultado */
.sim-result {
  text-align: center;
  margin-bottom: 24px;
}

.sim-result-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 8px;
}

.sim-result-value {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -3px;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
  background: linear-gradient(180deg, #fff 0%, #fff 40%, #666 100%);
  -webkit-text-fill-color: transparent;
}

.sim-result-detail {
  font-size: 13px;
  color: var(--muted);
}

/* breakdown */
.sim-breakdown {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-bd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.sim-bd-row > span:first-child {
  color: #555;
  min-width: 110px;
}

.sim-bd-qty {
  color: #444;
  flex: 1;
}

.sim-bd-val {
  font-weight: 700;
  color: rgba(130,220,130,.7);
  min-width: 60px;
  text-align: right;
}

/* ── PIXEL ART DECORATIVA ──────────────────── */
.affiliate-pixel-art {
  margin-bottom: 20px;
}

.apa-grid {
  display: grid;
  grid-template-columns: repeat(8, 8px);
  grid-template-rows: repeat(8, 8px);
  gap: 2px;
  opacity: .1;
}

.apa-grid span {
  border-radius: 1.5px;
  background: #fff;
  transition: opacity .4s;
}

/* padrão diagonal de crescimento */
.apa-grid span.on {
  opacity: 1;
  background: rgba(130,220,130,.6);
}

/* ── RESPONSIVO ────────────────────────────── */
@media(max-width:1200px) {
  .plans-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(max-width:900px) {
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sim-dist-plan {
    min-width: 120px;
    font-size: 10px;
  }
}

@media(max-width:640px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
  .plan-featured-badge {
    display: none;
  }
  .sim-result-value {
    font-size: 36px;
  }
  .sim-dist-plan {
    min-width: 100px;
    font-size: 9px;
  }
}