/**
 * Componentes CSS para Links de Afiliados
 * Design profissional e responsivo
 */

/* ========================================
   1. CTA Box - Banner Simples
   ======================================== */
.affiliate-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.affiliate-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.affiliate-cta-title {
  color: #fff;
  font-size: 1.4em;
  font-weight: 700;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.affiliate-cta-description {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1em;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.affiliate-cta-button {
  display: inline-block;
  background: #fff;
  color: #667eea;
  font-weight: 700;
  font-size: 1.05em;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.affiliate-cta-button:hover {
  background: #f8f9ff;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  color: #5568d3;
  text-decoration: none;
}

/* ========================================
   2. Product Card - Card de Produto
   ======================================== */
.affiliate-product-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.affiliate-product-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.affiliate-product-image {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f5;
}

.affiliate-product-content {
  flex: 1;
}

.affiliate-product-title {
  font-size: 1.3em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.affiliate-product-description {
  color: #555;
  font-size: 0.95em;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.affiliate-product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.affiliate-product-price {
  font-size: 1.4em;
  font-weight: 800;
  color: #27ae60;
}

.affiliate-product-button {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.affiliate-product-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  color: #fff;
  text-decoration: none;
}

/* ========================================
   3. Disclosure - Aviso Legal
   ======================================== */
.affiliate-disclosure {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.9em;
  line-height: 1.6;
  color: #856404;
}

.affiliate-disclosure strong {
  font-weight: 700;
  color: #664d03;
}

.affiliate-disclosure-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 1.2em;
}

/* ========================================
   4. Mini Badge - Badge Pequeno
   ======================================== */
.affiliate-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #667eea;
  color: #fff;
  font-size: 0.75em;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* ========================================
   5. Grid de Produtos - Lista de Múltiplos
   ======================================== */
.affiliate-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.affiliate-grid-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.affiliate-grid-item:hover {
  border-color: #667eea;
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.2);
  transform: translateY(-5px);
}

.affiliate-grid-item-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f5f5f5;
}

.affiliate-grid-item-content {
  padding: 20px;
}

.affiliate-grid-item-title {
  font-size: 1.15em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.affiliate-grid-item-description {
  color: #666;
  font-size: 0.9em;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.affiliate-grid-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.affiliate-grid-item-price {
  font-size: 1.3em;
  font-weight: 800;
  color: #27ae60;
}

.affiliate-grid-item-button {
  display: inline-block;
  background: #667eea;
  color: #fff;
  font-weight: 600;
  font-size: 0.9em;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.affiliate-grid-item-button:hover {
  background: #5568d3;
  transform: scale(1.05);
  color: #fff;
  text-decoration: none;
}

/* ========================================
   6. Inline Link - Link no Texto
   ======================================== */
.affiliate-inline-link {
  color: #667eea;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  transition: all 0.2s ease;
}

.affiliate-inline-link:hover {
  color: #5568d3;
  text-decoration-style: solid;
}

/* ========================================
   7. Responsividade Mobile
   ======================================== */
@media (max-width: 768px) {
  .affiliate-product-card {
    flex-direction: column;
    padding: 16px;
  }

  .affiliate-product-image {
    width: 100%;
    height: 200px;
  }

  .affiliate-product-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .affiliate-product-button,
  .affiliate-cta-button {
    text-align: center;
    display: block;
    width: 100%;
  }

  .affiliate-cta {
    padding: 20px;
    margin: 24px 0;
  }

  .affiliate-products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ========================================
   8. Animações
   ======================================== */
@keyframes pulse-shadow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
  }
}

.affiliate-cta.animate-pulse {
  animation: pulse-shadow 2s infinite;
}

/* ========================================
   9. Dark Mode (Opcional)
   ======================================== */
@media (prefers-color-scheme: dark) {
  .affiliate-product-card,
  .affiliate-grid-item {
    background: #1e1e1e;
    border-color: #333;
  }

  .affiliate-product-title,
  .affiliate-grid-item-title {
    color: #fff;
  }

  .affiliate-product-description,
  .affiliate-grid-item-description {
    color: #ccc;
  }
}
