/*
 * Conheça quem faz (home de vendas): trilho de cartões com o retrato de quem
 * faz, cidade, trecho da história, até 3 peças e os botões. Prefixo hm-qf-.
 * Celular: cartão a 82% da largura, foto quadrada, 1 linha da história.
 * Computador: 4 cartões à mostra (5 acima de 1800 px), retrato 4:5, 2 linhas.
 * O "Seguindo" usa o .seg-btn.ba-seg-on do layout (mesmo botão da página da loja).
 */
.hm-qf { content-visibility: auto; contain-intrinsic-size: auto 680px; }

.hm-qf-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.hm-qf-cab-dir { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }

/* Trilho: o pedaço do próximo cartão fica à mostra */
.hm-trilho.hm-qf-trilho { grid-auto-columns: 82%; gap: 12px; align-items: stretch; }

/* Cartão */
.hm-qf-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--hm-linha); border-radius: 20px; overflow: hidden;
              box-shadow: 0 1px 2px rgba(28, 25, 23, .04); transition: border-color .2s ease; }
/* Sem sombra grande no hover: o trilho rola de lado e cortaria a sombra */
.hm-qf-card:hover { border-color: rgba(31, 94, 0, .28); }

.hm-qf-foto { position: relative; aspect-ratio: 1; background: var(--hm-bege); overflow: hidden; }
.hm-qf-foto > a { display: block; width: 100%; height: 100%; }
.hm-qf-retrato { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; transition: transform .45s ease; }
.hm-qf-card:hover .hm-qf-retrato { transform: scale(1.03); }
.hm-qf-logo { position: absolute; left: 10px; bottom: 10px; width: 48px; height: 48px; border-radius: 999px; object-fit: cover; background: #fff;
              border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .16); }

/* Seguir: pílula no alto da foto (vira "Seguindo" pelo layout) */
.hm-qf-seg { position: absolute; right: 10px; top: 10px; min-height: 40px; display: inline-flex; align-items: center; padding: 6px 14px; border: 0; border-radius: 999px;
             background: rgba(255, 255, 255, .94); color: var(--hm-tinta); font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer;
             box-shadow: 0 2px 10px rgba(0, 0, 0, .14); transition: background-color .15s ease, color .15s ease; }
.hm-qf-seg:hover { background: #fff; color: var(--hm-verde); }
.hm-qf-seg .seg-off { display: inline-flex; align-items: center; gap: 6px; }
.hm-qf-seg .seg-on { align-items: center; gap: 6px; }
.hm-qf-seg .seg-off i { color: var(--hm-verde); }

/* Texto do cartão */
.hm-qf-corpo { flex: 1 1 auto; display: flex; flex-direction: column; gap: 7px; padding: 14px 14px 16px; min-width: 0; }
.hm-qf-nome { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 19px; line-height: 1.2; letter-spacing: -.01em;
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-qf-nome a:hover { color: var(--hm-verde); }
.hm-qf-local { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--hm-suave); min-width: 0; }
.hm-qf-local i { color: var(--hm-verde); font-size: 12px; }
.hm-qf-hist { margin: 0; font-size: 13.5px; line-height: 1.45; color: #44403c; font-style: italic;
              display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hm-qf-nota { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--hm-suave); }
.hm-qf-nota i { color: var(--hm-ouro); font-size: 11.5px; margin-right: 2px; }
.hm-qf-nota b { color: var(--hm-tinta); font-weight: 700; }

/* Três peças com preço */
.hm-qf-pecas { list-style: none; margin: 3px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hm-qf-pecas li { min-width: 0; }
.hm-qf-peca { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hm-qf-peca-img { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #f5f5f4; }
.hm-qf-peca-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.hm-qf-peca:hover .hm-qf-peca-img img { transform: scale(1.05); }
.hm-qf-preco { font-size: 12px; font-weight: 800; color: var(--hm-verde); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Botões lado a lado, 44 px de altura */
.hm-qf-acoes { margin-top: auto; padding-top: 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm-qf-acoes .hm-btn { min-height: 44px; padding: 8px 10px; font-size: 13.5px; white-space: nowrap; min-width: 0; }

/* Legenda das notas */
.hm-qf-legenda { margin: 12px 0 0; display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.45; color: var(--hm-suave); max-width: 80ch; }
.hm-qf-legenda i { margin-top: 2px; color: #a8a29e; }

/* Celular estreito: o link do cabeçalho não espreme o título */
@media (max-width: 479px) {
    .hm-qf .hm-cab { flex-wrap: wrap; }
}

@media (min-width: 640px) {
    .hm-trilho.hm-qf-trilho { grid-auto-columns: 46%; gap: 14px; }
    .hm-qf-hist { -webkit-line-clamp: 2; min-height: 2.9em; }
}
@media (min-width: 1024px) {
    .hm-trilho.hm-qf-trilho { grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; }
    .hm-qf-foto { aspect-ratio: 4 / 5; }
    /* Cartão mais estreito (~216 px a 1024): o ícone do Conversar sai para o texto caber */
    .hm-qf-acoes .hm-btn { font-size: 13px; padding: 8px 6px; }
    .hm-qf-acoes .hm-btn i { display: none; }
}
@media (min-width: 1280px) {
    .hm-qf-acoes .hm-btn { font-size: 13.5px; padding: 8px 10px; }
    .hm-qf-acoes .hm-btn i { display: inline-block; }
    .hm-qf-nome { font-size: 20px; }
}
@media (min-width: 1800px) {
    .hm-trilho.hm-qf-trilho { grid-auto-columns: calc((100% - 4 * 16px) / 5); }
}

@media (prefers-reduced-motion: reduce) {
    .hm-qf-card, .hm-qf-retrato, .hm-qf-peca-img img, .hm-qf-seg { transition: none; }
    .hm-qf-card:hover .hm-qf-retrato, .hm-qf-peca:hover .hm-qf-peca-img img { transform: none; }
}
