/* ============================================================
   afiliados.css — Vitrine de Produtos Afiliados
   ============================================================ */

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.afil-hero {
  background: var(--cor-primaria);
  padding: 2.5rem 1.5rem 2rem;
  color: #fff;
}
.afil-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: .4rem;
}
.afil-hero p { color: rgba(255,255,255,.6); font-size: .95rem; }

/* ── TABS ────────────────────────────────────────────────────── */
.afil-tabs {
  display: flex;
  border-bottom: 2px solid var(--cor-borda);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  gap: 0;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--cor-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.tab-btn:hover { color: var(--cor-primaria); }
.tab-btn.ativo {
  color: var(--cor-primaria);
  border-bottom-color: var(--cor-acento);
}
.tab-btn .tab-icon { font-size: 1.1rem; }

/* ── FILTERS ─────────────────────────────────────────────────── */
.afil-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.afil-filters select,
.afil-search {
  padding: .5rem .9rem;
  border: 1px solid var(--cor-borda);
  border-radius: var(--radius);
  font-size: .88rem;
  font-family: var(--font-body);
  background: #fff;
  color: var(--cor-primaria);
}
.afil-search {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
}
.afil-search:focus,
.afil-filters select:focus { outline: 2px solid var(--cor-acento); }
.afil-count {
  font-size: .8rem;
  color: var(--cor-muted);
  font-family: var(--font-mono);
  margin-left: auto;
}
.btn-clear-filters {
  background: none;
  border: 1px solid var(--cor-borda);
  border-radius: var(--radius);
  padding: .45rem .9rem;
  font-size: .8rem;
  color: var(--cor-muted);
  cursor: pointer;
  transition: all .2s;
}
.btn-clear-filters:hover { border-color: var(--cor-acento); color: var(--cor-acento); }

/* ── PRODUCT GRID ────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ── PRODUCT CARD ────────────────────────────────────────────── */
.product-card {
  background: #fff;
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}
.product-card--destaque { border-color: var(--cor-acento); }
.product-card--destaque::before {
  content: '★ Destaque';
  position: absolute;
  top: .6rem; left: .6rem;
  background: var(--cor-acento);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.product-card__img-wrap {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #faf9f6;
  border-bottom: 1px solid var(--cor-borda);
}
.product-card__img {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
}
.product-card__img-placeholder {
  width: 60px; height: 60px;
  background: var(--cor-borda);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cor-muted);
  font-size: 1.5rem;
}
.product-card__body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-card__store { margin-bottom: .55rem; }
.product-card__title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cor-primaria);
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__desc {
  font-size: .82rem;
  color: var(--cor-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cor-acento);
  margin-bottom: .85rem;
}
.product-card__price--empty { color: var(--cor-muted); font-size: .85rem; font-weight: 400; }
.product-card__cta {
  width: 100%;
  justify-content: center;
  font-size: .88rem;
}

/* Skeleton */
.product-card--skeleton .product-card__img-wrap { background: var(--cor-borda); }
.sk-img { width: 80px; height: 80px; border-radius: 6px; margin: auto; }
.sk-store { width: 80px; height: 16px; margin-bottom: .55rem; }
.sk-ptitle { width: 100%; height: 16px; margin-bottom: .35rem; }
.sk-ptitle2 { width: 75%; height: 16px; margin-bottom: .7rem; }
.sk-pdesc  { width: 100%; height: 12px; margin-bottom: .25rem; }
.sk-pdesc2 { width: 90%; height: 12px; margin-bottom: .7rem; }
.sk-price  { width: 80px; height: 20px; margin-bottom: .8rem; }
.sk-cta    { width: 100%; height: 38px; border-radius: var(--radius); }

/* Empty */
.afil-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cor-muted);
}
.afil-empty p { font-size: 1rem; }
