/**
 * Estilos do Módulo de Recomendação de Suprimentos (Afiliados Amazon / ML / Shopee)
 * Responsivo: Grid 4 colunas no Desktop e Carrossel Horizontal / Grid 2x2 no Mobile.
 */
.aff-module {
  background: linear-gradient(155deg, #ffffff 0%, #f8fafc 60%, #fffbeb 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.35rem;
  margin: 1.5rem 0;
  box-shadow: 0 8px 26px -6px rgba(15, 23, 42, 0.07);
  text-align: left;
}

.aff-module--primary {
  border: 1.5px solid #fcd34d;
  box-shadow: 0 12px 32px -8px rgba(245, 158, 11, 0.16);
}

.aff-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.aff-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.aff-header-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.28;
  margin: 0;
}

.aff-header-sub {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0.2rem 0 0 0;
  line-height: 1.45;
}

.aff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 920px) {
  .aff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .aff-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding-bottom: 0.45rem;
    -webkit-overflow-scrolling: touch;
  }
  .aff-card {
    flex: 0 0 76%;
    max-width: 240px;
    scroll-snap-align: start;
  }
}

.aff-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.aff-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.12);
  border-color: #f59e0b;
}

.aff-card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.aff-img-wrap {
  position: relative;
  background: #ffffff;
  padding: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 146px;
  border-bottom: 1px solid #f1f5f9;
}

.aff-img {
  max-width: 100%;
  max-height: 128px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.aff-card:hover .aff-img {
  transform: scale(1.06);
}

.aff-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.aff-body {
  padding: 0.8rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 0.7rem;
}

.aff-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aff-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.58rem 0.7rem;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffad33 0%, #ff9900 55%, #e47911 100%);
  border: 1px solid #d57700;
  color: #111827 !important;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 3px 10px rgba(228, 121, 17, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.aff-card:hover .aff-cta {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(228, 121, 17, 0.38);
}

.aff-disclaimer {
  margin: 0.85rem 0 0 0 !important;
  padding-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.73rem !important;
  color: #64748b !important;
  line-height: 1.45;
  text-align: center;
  font-style: italic;
}

.dev-signature {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--text, #0f172a);
}

/* =========================================================
   MÓDULO COMPARTILHADO DE APOIO VIA PIX ("PAGUE UM CAFÉ")
   Otimizado para CRO, Alto Contraste e Mobile-First
   ========================================================= */
.pix-support-card {
  margin: 1.35rem 0;
  background: linear-gradient(145deg, #ecfdf5 0%, #ffffff 50%, #f0fdf4 100%);
  border: 2px solid #10b981;
  border-radius: 18px;
  padding: 1.45rem;
  box-shadow: 0 14px 36px -8px rgba(5, 150, 105, 0.22);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.pix-support-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.pix-coffee-badge {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -3px rgba(4, 120, 87, 0.4);
}

.pix-support-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #064e3b;
  line-height: 1.28;
  margin: 0;
  letter-spacing: -0.01em;
}

.pix-support-subtitle {
  font-size: 0.87rem;
  color: #065f46;
  margin: 0.28rem 0 0 0;
  line-height: 1.45;
  font-weight: 500;
}

.pix-support-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pix-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1.5px solid #6ee7b7;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.08);
}

.pix-qr-canvas {
  width: 156px;
  height: 156px;
  display: block;
  image-rendering: pixelated;
}

.pix-qr-caption {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #047857;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pix-details-col {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  min-width: 0;
}

.pix-value-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pix-value-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #064e3b;
}

.pix-value-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pix-val-btn {
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid #6ee7b7;
  background: #f0fdf4;
  color: #065f46;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pix-val-btn:hover {
  border-color: #059669;
  background: #d1fae5;
  transform: translateY(-1px);
}

.pix-val-btn.active {
  background: #047857;
  border-color: #047857;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(4, 120, 87, 0.28);
}

.pix-copy-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.pix-input-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #065f46;
}

.pix-payload-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  border: 1.5px solid #94a3b8;
  background: #f8fafc;
  font-family: monospace;
  font-size: 0.76rem;
  color: #1e293b;
  transition: border-color 0.15s ease;
}

.pix-payload-input:focus {
  outline: none;
  border-color: #059669;
  background: #ffffff;
}

.pix-buttons-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  width: 100%;
}

.btn-pix-copy {
  flex: 1 1 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.2rem;
  border: 2px solid #064e3b;
  border-radius: 11px;
  background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(4, 120, 87, 0.36);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-pix-copy:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #065f46 0%, #047857 60%, #059669 100%);
  box-shadow: 0 10px 24px rgba(4, 120, 87, 0.48);
}

.btn-pix-copy:active {
  transform: scale(0.98);
}

.btn-pix-copy.is-copied {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
  border-color: #15803d !important;
  color: #ffffff !important;
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.5) !important;
}

.btn-pix-key {
  padding: 0.78rem 1rem;
  border-radius: 11px;
  border: 1.5px solid #059669;
  background: #ffffff;
  color: #065f46;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-pix-key:hover {
  background: #ecfdf5;
  transform: translateY(-1px);
}

.pix-receiver-meta {
  font-size: 0.74rem;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding-top: 0.45rem;
  border-top: 1px dashed #d1fae5;
}

.pix-receiver-meta code {
  font-size: 0.71rem;
  background: #ecfdf5;
  color: #065f46;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #a7f3d0;
  word-break: break-all;
}

.pix-feedback-toast {
  margin-top: 0.15rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #065f46;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .pix-support-card {
    padding: 1.15rem;
  }
  .pix-support-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
  }
  .pix-support-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 0.95rem;
    gap: 1rem;
  }
  .pix-qr-box {
    margin: 0 auto;
  }
  .pix-qr-canvas {
    width: 168px;
    height: 168px;
  }
  .pix-value-selector {
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 0.4rem;
  }
  .pix-value-pills {
    justify-content: center;
    width: 100%;
  }
  .pix-val-btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .pix-copy-stack {
    width: 100%;
    text-align: left;
  }
  .pix-payload-input {
    width: 100%;
  }
  .pix-buttons-wrap {
    flex-direction: column;
    width: 100%;
  }
  .btn-pix-copy,
  .btn-pix-key {
    width: 100%;
    flex: 1 1 auto;
    box-sizing: border-box;
  }
  .pix-receiver-meta {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 0.25rem;
    width: 100%;
  }
  .pix-meta-sep {
    display: none;
  }
}

/* =========================================================
   PUBLICIDADE INTERNA DO ECOSSISTEMA
   (CriaPoster ↔ CriaLivretos ↔ CriaEtiquetas)
   ========================================================= */
.internal-promo-box {
  margin: 1.35rem 0;
  padding: 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.07);
}

.internal-promo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.internal-promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  background: #e2e8f0;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.internal-promo-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.internal-promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

@media (max-width: 680px) {
  .internal-promo-grid {
    grid-template-columns: 1fr;
  }
}

.internal-tool-card {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  text-decoration: none !important;
  color: #0f172a !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.internal-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(15, 23, 42, 0.14);
}

.internal-tool-card--poster:hover { border-color: #6366f1; }
.internal-tool-card--livretos:hover { border-color: #0d9488; }
.internal-tool-card--etiquetas:hover { border-color: #ea580c; }

.internal-tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.internal-tool-icon--poster {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  box-shadow: 0 6px 16px -3px rgba(99, 102, 241, 0.4);
}

.internal-tool-icon--livretos {
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  box-shadow: 0 6px 16px -3px rgba(13, 148, 136, 0.4);
}

.internal-tool-icon--etiquetas {
  background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
  box-shadow: 0 6px 16px -3px rgba(234, 88, 12, 0.4);
}

.internal-tool-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.internal-tool-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.internal-tool-kicker--poster { color: #4f46e5; }
.internal-tool-kicker--livretos { color: #0f766e; }
.internal-tool-kicker--etiquetas { color: #c2410c; }

.internal-tool-name {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.internal-tool-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.38;
}

.internal-tool-cta {
  padding: 0.45rem 0.8rem;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.internal-tool-cta--poster { background: #eef2ff; color: #4f46e5; }
.internal-tool-cta--livretos { background: #f0fdfa; color: #0f766e; }
.internal-tool-cta--etiquetas { background: #fff7ed; color: #c2410c; }

@media (max-width: 520px) {
  .internal-tool-card {
    flex-wrap: wrap;
  }
  .internal-tool-cta {
    width: 100%;
    text-align: center;
    margin-top: 0.25rem;
  }
}

/* Card Flutuante Unificado do Ecossistema */
.ecosystem-floating-promo {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(234, 88, 12, 0.4);
  border-radius: 14px;
  box-shadow: 0 14px 34px -8px rgba(15, 23, 42, 0.22);
  display: flex;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
  max-width: 370px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ecosystem-floating-promo:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.28);
}

.ecosystem-floating-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none !important;
  color: #0f172a !important;
  flex: 1;
}

.ecosystem-floating-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.ecosystem-floating-text strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c2410c;
  margin-bottom: 2px;
}

.ecosystem-floating-text span {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.ecosystem-floating-text small {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 1px;
}

.ecosystem-floating-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.35rem;
  padding: 10px 12px;
  cursor: pointer;
  line-height: 1;
}

.ecosystem-floating-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

@media (max-width: 600px) {
  .ecosystem-floating-promo {
    bottom: 14px;
    right: 14px;
    left: 14px;
    max-width: none;
  }
}
