/* ============================================================
   CARD DE PRODUTO (.lcc) — card canônico, site inteiro
   (loja/categoria/busca, home, mega menu, cross-sell).
   Polimento 2026-09-11 — mesma família da PDP v2: superfície branca
   raio 8 com sombra suave (sem borda), foto com contorno de 1px
   rgba(0,0,0,.1), selo −% plano, preço navy com centavos em
   sobrescrito, Pix em verde, CTA azul-claro da PDP. Sem filete
   bicolor, sem brilho varrendo, sem pulso, sem zoom na foto.
   Pílulas contextuais continuam ciclando (product-card.js).
   Tudo respeita prefers-reduced-motion.
   ============================================================ */

.lcc {
  --lcc-r: 8px;
  --lcc-inset: 4px;               /* respiro da foto dentro do card → raio interno 8 − 4 = 4 */
  --lcc-shadow: 0 1px 2px rgba(0, 0, 0, .10), 0 1px 8px rgba(0, 0, 0, .04);
  --lcc-shadow-hover: 0 1px 3px rgba(0, 0, 0, .12), 0 6px 20px rgba(0, 0, 0, .08);
  --lcc-navy: #14375F;
  --lcc-green: #00A650;
  --lcc-blue: #3483FA;
  --lcc-blue-soft: #E3EDFB;
  --lcc-blue-soft-hover: #D3E3F9;
  --lcc-ease: cubic-bezier(.2, 0, 0, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 0;
  border-radius: var(--lcc-r);
  box-shadow: var(--lcc-shadow);
  overflow: hidden;
  min-width: 0;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: box-shadow .2s var(--lcc-ease);
}
@media (hover: hover) {
  .lcc:hover { box-shadow: var(--lcc-shadow-hover); }
}

/* filete bicolor antigo — aposentado (o markup continua no PHP por compatibilidade) */
.lcc__topline { display: none; }

/* ── Favorito ──────────────────────────────────────────────── */
.lcc__fav {
  position: absolute;
  top: calc(var(--lcc-inset) + 6px);
  right: calc(var(--lcc-inset) + 6px);
  z-index: 4;
  width: 32px; height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .04);
  color: var(--lc-ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition-property: color, scale;
  transition-duration: .15s;
  transition-timing-function: var(--lcc-ease);
}
.lcc__fav::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; } /* alvo de toque 40×40 */
.lcc__fav:hover { color: var(--lc-danger); }
.lcc__fav:active { scale: .96; }
.lcc__fav.is-active,
.lcc__fav.is-fav { color: var(--lc-danger); } /* favorites.js marca .is-fav */

/* ── Mídia ─────────────────────────────────────────────────── */
.lcc__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  margin: var(--lcc-inset) var(--lcc-inset) 0;
  border-radius: calc(var(--lcc-r) - var(--lcc-inset));
  background: #fff;
  overflow: hidden;
}
/* contorno de 1px na foto (preto puro a 10%) — define a borda de fotos de fundo branco sobre o card branco */
.lcc__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
  pointer-events: none;
  z-index: 2;
}
.lcc__img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}
.lcc__noimg {
  display: grid;
  place-items: center;
  height: 100%;
  color: rgba(0, 0, 0, .18);
}
.lcc__noimg svg { width: 40px; height: 40px; }

/* selo −% — plano, pequeno, verde da família (sem bandeirinha nem brilho) */
.lcc__off {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--lcc-green);
  color: #fff;
  font-family: var(--lc-font-body);
  font-weight: 600;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
}
.lcc__off i { font-style: normal; font-size: inherit; margin-left: 1px; }

.lcc__soldout {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  background: rgba(26, 28, 33, .78);
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 6px 0;
}
.lcc.is-sold-out .lcc__img { filter: grayscale(.9); opacity: .65; }

/* ── Corpo ─────────────────────────────────────────────────── */
.lcc__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 10px 12px 12px;
  min-width: 0;
}

.lcc__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 16px;
  line-height: 16px;
}
.lcc__brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--lc-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lcc__rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--lc-ink-3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.lcc__rating svg { width: 11px; height: 11px; }
.lcc__rating b { color: var(--lc-ink-2); font-weight: 600; }

.lcc__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--lc-ink);
  font-family: var(--lc-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  min-height: 2.7em;
  text-decoration: none;
  text-wrap: pretty;
}
.lcc__name:hover { color: var(--lc-ink); text-decoration: underline; }

/* ── Pílulas contextuais (ciclam via product-card.js) ───────────── */
.lcc__signals {
  position: relative;
  height: 20px;
  overflow: hidden;
}
.lcc__pill {
  position: absolute;
  inset: 0 auto auto 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition-property: opacity, transform;
  transition-duration: .3s;
  transition-timing-function: var(--lcc-ease);
  pointer-events: none;
}
.lcc__pill svg { flex: none; }
.lcc__pill.is-on { opacity: 1; transform: translateY(0); }
.lcc__pill--green { background: #EBFAEE; color: #00833F; }
.lcc__pill--perk  { background: #00833F; color: #fff; } /* frete grátis garantido (vantagem) */
.lcc__pill--blue  { background: var(--lcc-blue-soft); color: #2968C8; }
.lcc__pill--gold  { background: var(--lc-cta-50); color: var(--lc-cta-700); box-shadow: inset 0 0 0 1px rgba(232, 89, 12, .35); }
.lcc__pill--ink   { background: #F5F5F5; color: var(--lcc-navy); }
.lcc__pill--soft  { background: #F5F5F5; color: var(--lc-ink-2); }

/* ── Preço ─────────────────────────────────────────────────── */
.lcc__pricing { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.lcc__from {
  font-size: 12px;
  line-height: 16px;
  color: var(--lc-ink-3);
  text-decoration: line-through;
}
/* sem preço "de": reserva a linha para o preço ficar na mesma altura dos vizinhos da fileira */
.lcc__pricing > .lcc__price:first-child { margin-top: 18px; }
.lcc__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--lcc-navy);
  font-family: var(--lc-font-display);
  line-height: 1;
}
.lcc__price-pre { margin-right: 4px; font-family: var(--lc-font-body); font-size: 11px; font-weight: 400; color: var(--lc-ink-3); white-space: nowrap; }
.lcc__price-cur { font-size: 14px; font-weight: 600; margin-right: 3px; }
.lcc__price b { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.lcc__price i { align-self: flex-start; font-style: normal; font-size: 12px; font-weight: 600; margin: 2px 0 0 1px; }
.lcc__pix {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--lcc-green);
}
.lcc__inst {
  font-size: 12px;
  line-height: 16px;
  color: var(--lc-ink-3);
}

/* ── Financiamento (máquinas) — linha de texto azul, sem pulso nem brilho ── */
.lcc__fin {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--lcc-blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-decoration: none;
  transition: color .15s var(--lcc-ease);
}
.lcc__fin b { font-weight: 600; }
.lcc__fin svg { flex-shrink: 0; }
.lcc__fin-txt {
  min-width: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lcc__fin:hover { color: #2968C8; }
.lcc__fin-glow { display: none; }

/* ── CTA — botão secundário da PDP (azul-claro), sem caixa-alta ── */
.lcc__spacer { flex: 1; }
.lcc__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  margin-top: 4px;
  border-radius: 6px;
  background: var(--lcc-blue-soft);
  color: var(--lcc-blue);
  font-family: var(--lc-font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  transition-property: background-color, color, scale;
  transition-duration: .15s;
  transition-timing-function: var(--lcc-ease);
}
.lcc__cta:hover { background: var(--lcc-blue-soft-hover); }
.lcc__cta:active { scale: .96; }
.lcc__cta-arrow { display: none; }
.lcc__cta.is-disabled {
  background: #F5F5F5;
  color: var(--lc-ink-3);
  cursor: not-allowed;
  pointer-events: none;
}
.lcc__cta.loading { opacity: .65; pointer-events: none; }

/* ── Entrada (reveal on scroll — product-card.js) ───────────────── */
.lcc[data-lcc-reveal] { opacity: 0; transform: translateY(14px); }
.lcc.is-in { opacity: 1; transform: none; transition: opacity .4s ease, transform .4s ease, box-shadow .2s var(--lcc-ease); }

/* ── Celular: card mais compacto (grade de 2 colunas / carrosséis) ── */
@media (max-width: 639.98px) {
  .lcc__body { gap: 5px; padding: 8px 10px 10px; }
  .lcc__img { padding: 8px; }
  .lcc__name { font-size: 13px; }
  .lcc__price b { font-size: 21px; }
  .lcc__price-cur { font-size: 13px; }
  .lcc__off { top: 6px; left: 6px; }
  .lcc__fav { top: calc(var(--lcc-inset) + 4px); right: calc(var(--lcc-inset) + 4px); width: 30px; height: 30px; font-size: 15px; }
  .lcc__fav::before { inset: -5px; }
  .lcc__pill { font-size: 10.5px; padding: 0 5px; }
}

/* ── Reduced motion: desliga tudo que se mexe ──────────────── */
@media (prefers-reduced-motion: reduce) {
  .lcc, .lcc__img, .lcc__fav, .lcc__cta { transition: none !important; }
  .lcc[data-lcc-reveal] { opacity: 1; transform: none; }
  .lcc__pill { transition: none; }
}

/* ── Contexto: carrosséis antigos (.mo-tile) e grids WC ────── */
.lcc.mo-tile { flex-shrink: 0; }
.woocommerce ul.products li.product .lcc { height: 100%; }

/* ── DEFESA contra CSS legado das seções (color-trap) ─────────
   Blocos antigos (.mo-flash/.mo-featured/.mo-offers-shell e os
   shells escuros) pintam <a> de branco/sublinhado e o título/CTA
   do card somem ou mudam de cor. O card é soberano sobre as
   próprias cores — sempre. */
.lcc .lcc__name,
section .lcc .lcc__name {
  color: var(--lc-ink) !important;
  text-decoration: none !important;
}
.lcc .lcc__name:hover { color: var(--lc-ink) !important; text-decoration: underline !important; }
.lcc .lcc__cta,
.lcc .lcc__cta:hover,
.lcc .lcc__cta:focus,
.lcc .lcc__cta:visited,
section .lcc .lcc__cta {
  color: var(--lcc-blue) !important;
  text-decoration: none !important;
}
.lcc .lcc__cta.is-disabled { color: var(--lc-ink-3) !important; }
.lcc .lcc__fin,
.lcc .lcc__fin:visited { color: var(--lcc-blue) !important; text-decoration: none !important; }
.lcc .lcc__fin:hover { color: #2968C8 !important; text-decoration: none !important; }
.lcc .lcc__brand { color: var(--lc-ink-3) !important; }
.lcc .lcc__pix { color: var(--lcc-green) !important; }
.lcc .lcc__from { color: var(--lc-ink-3) !important; }
.lcc .lcc__price { color: var(--lcc-navy) !important; }
/* meta row vazia (sem marca e sem rating) não deixa buraco */
.lcc__meta:empty { display: none; }
