/* Página de cartas contempladas */
main#conteudo { padding-top: 120px; }

.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;
}

/* ---------- Ferramenta ---------- */
.cartas-tool {
  max-width: 980px;
  margin: clamp(24px, 5vw, 48px) auto 0;
  padding: 0 clamp(18px, 5vw, 40px);
}

.tool-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 20px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}
.tool-tabs .tab {
  min-height: 52px;
  padding: 0 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.tool-tabs .tab.is-active {
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.tool-form {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 170px auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.tf-field {
  display: grid;
  gap: 7px;
  margin: 0;
}
.tf-field > span {
  font-size: 12px;
  font-weight: 800;
  color: var(--black);
}
.tf-field select,
.tf-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #d6cfbe;
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}
.tf-field select:focus,
.tf-field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.tool-form .primary-button { min-height: 52px; padding: 0 28px; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.ghost-btn:hover { border-color: rgba(200, 162, 74, .6); background: #fbf7ea; }

.tool-msg {
  margin: 10px 2px 0;
  min-height: 18px;
  color: var(--alert);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Resultados ---------- */
.cartas-results {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px clamp(18px, 5vw, 40px) clamp(60px, 9vw, 100px);
}
.results-loading { color: var(--muted); font-weight: 600; }

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.results-bar p { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.results-bar p span { color: var(--muted); font-weight: 500; }

/* ---------- Lista de resultados ---------- */
.row-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.row { border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: #fcfaf3; }

.row-grid {
  display: grid;
  grid-template-columns: 148px repeat(4, minmax(0, 1fr)) minmax(200px, 224px);
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
}

.row-id { display: grid; gap: 2px; min-width: 0; }
.row-badge {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub { font-size: 12px; font-weight: 700; color: #7a5f1e; }

.cell { display: grid; gap: 2px; min-width: 0; }
.cell span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #7c735f;
}
.cell strong { font-size: 15px; color: #101010; white-space: nowrap; }

.row-cta { display: flex; gap: 8px; justify-content: flex-end; }
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.btn-mini:hover { border-color: rgba(200, 162, 74, .6); background: #fbf7ea; }
.btn-mini.primary {
  border: 0;
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.row-more { padding: 0 18px 14px; }
.row-more summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  list-style: none;
}
.row-more summary::-webkit-details-marker { display: none; }
.row-more summary::before { content: "+ "; color: var(--gold); font-weight: 900; }
.row-more[open] summary::before { content: "− "; }
.row-more ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.row-more li {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  font-size: 12px;
  color: var(--muted);
}
.row-more li strong { color: var(--ink); }
.row-taxa {
  margin: 8px 18px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.more-wrap { margin-top: 18px; text-align: center; }

.results-msg {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.results-msg p { margin: 0; }

@media (max-width: 1000px) {
  .row-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    padding: 16px 16px;
  }
  .row-id {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
  .row-cta {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .row-cta .btn-mini { flex: 1; min-height: 42px; }
}

@media (max-width: 780px) {
  .tool-form {
    grid-template-columns: 1fr 1fr;
  }
  .tool-form .tf-grow { grid-column: 1 / -1; }
  .tool-form .primary-button { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  main#conteudo { padding-top: 104px; }
  .tool-form { grid-template-columns: 1fr; padding: 16px; }
  .tool-tabs { width: 100%; }
  .tool-tabs .tab { flex: 1; padding: 0 16px; min-height: 48px; font-size: 16px; }
}

/* ===== Múltiplos fornecedores + WhatsApp CTA ===== */
.forn-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}
.forn-chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: #4a4538;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.forn-chip:hover { border-color: rgba(200, 162, 74, .55); }
.forn-chip.is-active {
  color: #111;
  border-color: rgba(200, 162, 74, .7);
  background: rgba(200, 162, 74, .2);
}

.forn-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ece6d4;
  color: #6b5a2e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.row.is-hs { border-left: 4px solid var(--gold); }
.row.is-hs .row-badge::after {
  content: "topo";
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #111;
  font-family: Inter, sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.btn-wa {
  gap: 6px;
  color: #fff !important;
  background: #25d366 !important;
  border-color: #25d366 !important;
}
.btn-wa:hover { filter: brightness(1.05); }
.wa-ico { width: 15px; height: 15px; flex: none; }
