/*
 * Produtos do Programa de Afiliados no site (18/10/2026): o bloco "Achados do Amigo Pet" da home
 * e a folha de compartilhar.
 *
 * Folha propria, carregada DEPOIS da home-premium.css: usa as mesmas cores, fontes, raios e
 * sombras (variaveis do :root de la) e nao muda nada do que ja existe.
 * O botao de comprar segue o prototipo aprovado: amarelo do Mercado Livre.
 */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[data-produtos-bloco][hidden],
[data-produtos-nav][hidden] { display: none !important; }

/* ---------------------------------------------------------------- Bloco da home */
/* Segunda secao, logo depois da faixa do topo: um pouco menos de respiro que as outras. */
.achados { padding: 72px 0 24px; }
/* O cabecalho fixo nao cobre o titulo quando o menu leva ate aqui. */
#produtos { scroll-margin-top: 70px; }

/* Menu do topo com o item "Produtos": em telas medias (antes do menu de celular, que comeca em
   900 px) os itens ficam um pouco mais juntos para caber numa linha so, como antes. */
@media (min-width: 901px) and (max-width: 1179px) {
  .nav { gap: 2px; }
  .nav > a:not(.btn) { padding: 10px 8px; font-size: .92rem; }
  .nav .btn { margin-left: 4px; }
  .nav .lang-switch { margin-left: 2px; }
}
@media (min-width: 901px) and (max-width: 999px) {
  .topbar-inner { gap: 12px; }
  .nav > a:not(.btn) { padding: 10px 6px; font-size: .88rem; }
  .nav .lang-switch button { width: 36px; }
  .nav .btn-sm { padding: 10px 12px; }
}
/* So o titulo (o dono tirou o sobretitulo e o "Ver todos no app" em 19/10/2026). */
.achados-head { margin-bottom: 30px; }
.achados-head h2 { margin: 0; }
.achados-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.achados-nota { margin: 24px auto 0; max-width: 760px; text-align: center; font-size: .9rem; color: var(--muted); }

/* ---------------------------------------------------------------- Cartao */
.pcard {
  display: flex; flex-direction: column; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: reduce) { .pcard, .pcard:hover { transform: none; } }
.pcard-img {
  position: relative; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden;
  display: grid; place-items: center; background: linear-gradient(160deg, var(--lime-soft), var(--soft));
}
.pcard-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.p-ic { font-size: 3.6rem; line-height: 1; }
.pcard-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; padding-top: 12px; }
.pcard h3 {
  font-family: var(--font-body); font-size: .98rem; font-weight: 600; line-height: 1.35; letter-spacing: 0;
  color: var(--ink); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-para { font-size: .8rem; font-weight: 700; color: var(--green-600); }

.preco { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 4px; }
.preco strong { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; color: var(--green-950); letter-spacing: -.01em; }
.preco .off { font-size: .78rem; font-weight: 800; color: #00744a; background: #e2f5e9; border-radius: 999px; padding: 2px 8px; }
.preco-loja { font-weight: 700; color: var(--muted); font-size: 1rem; }
.unit { font-size: .82rem; font-weight: 600; color: var(--muted); }
.ship { font-size: .8rem; font-weight: 700; color: #00744a; }
.visto { font-size: .76rem; line-height: 1.4; color: var(--muted); }

.pcard-acoes { display: flex; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 12px; }
.btn-comprar {
  flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 14px; border-radius: 999px; text-align: center; text-decoration: none;
  font-family: var(--font-body); font-weight: 700; font-size: .9rem; line-height: 1.2;
  background: #ffe600; color: #2d3277; box-shadow: 0 10px 20px -14px rgba(45, 50, 119, .8);
  transition: transform .15s ease, filter .15s ease;
}
.btn-comprar:hover { transform: translateY(-1px); filter: brightness(.97); }
.btn-comprar:focus-visible { outline-color: #2d3277; }
.btn-share {
  flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--green-800);
  cursor: pointer; font: 700 .95rem var(--font-body); transition: background-color .15s ease;
}
.btn-share:hover { background: var(--soft); }
.btn-share svg { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- Folha de compartilhar */
.share-dlg {
  width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 22px; margin: auto;
  border: 0; border-radius: 26px; background: #fff; color: var(--ink); box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
}
.share-dlg::backdrop { background: rgba(13, 46, 36, .45); }
.share-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.share-topo h2 { font-size: 1.3rem; margin: 0; }
.share-fechar {
  width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--soft); color: var(--green-900);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.share-msg { white-space: pre-line; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; font-size: .95rem; margin-bottom: 10px; }
.share-link input {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  font: 500 .9rem ui-monospace, Consolas, monospace; color: var(--muted); background: #fff;
}
.share-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; margin-top: 14px;
  border-radius: 999px; background: #25d366; color: #073b1f; font-weight: 800; text-decoration: none; font-size: 1.02rem;
}
.share-wa:hover { filter: brightness(.96); }
.share-wa svg { width: 24px; height: 24px; }
.share-outros { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.share-btn {
  min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--green-900);
  font: 700 .95rem var(--font-body); cursor: pointer;
}
.share-btn:hover { background: var(--soft); }
.share-btn[hidden] { display: none; }
.share-status { min-height: 1.4em; margin: 10px 0 0; text-align: center; font-size: .88rem; color: var(--green-600); font-weight: 600; }
@media (max-width: 560px) {
  /* No celular, a folha sobe de baixo, como no app. */
  .share-dlg { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 26px 26px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ---------------------------------------------------------------- Celular */
@media (max-width: 560px) {
  /* Lista: foto a esquerda, texto e botoes a direita. Cabe em 375 px sem rolar de lado. */
  .achados-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pcard { flex-direction: row; gap: 12px; padding: 12px; border-radius: 20px; }
  .pcard-img { flex: none; width: 108px; height: 108px; border-radius: 14px; }
  .pcard-info { padding-top: 0; }
  .pcard h3 { font-size: .93rem; }
  .p-ic { font-size: 2.6rem; }
  .preco strong { font-size: 1.22rem; }
  .btn-comprar { font-size: .86rem; padding: 8px 12px; }
  .achados-head { margin-bottom: 20px; }
}
