/**
 * Biblioteca de Fontes — UI profissional (serviço para clientes de gráfica)
 * Escopo isolado: .ashe-font-lib*
 * Tokens alinhados ao brand do child (musgo / papel / ink).
 */

.ashe-font-lib {
  --fl-moss: var(--ashe-wc-moss, #455a51);
  --fl-moss-deep: var(--ashe-wc-moss-deep, #2c3a34);
  --fl-moss-soft: var(--ashe-wc-moss-soft, #eef2ef);
  --fl-paper: var(--ashe-wc-paper, #f7f4ef);
  --fl-ink: var(--ashe-wc-ink, #17191a);
  --fl-muted: var(--ashe-wc-muted, #6a6e6c);
  --fl-line: var(--ashe-wc-line, #e5e1db);
  --fl-white: var(--ashe-wc-white, #fff);
  --fl-radius: var(--ashe-wc-radius-lg, 12px);
  --fl-radius-sm: var(--ashe-wc-radius, 8px);
  --fl-shadow: var(--ashe-wc-shadow-soft);
  --fl-shadow-lg: var(--ashe-wc-shadow-hover, var(--ashe-wc-shadow));
  --fl-max: min(var(--ashe-wc-max, 1320px), 100%);
  --fl-focus: var(--ashe-wc-focus, 0 0 0 3px rgba(69, 90, 81, 0.2));
  background: transparent;
  color: var(--fl-ink);
  padding: 0 0 3rem;
  font-size: var(--ashe-wc-fs-lead);
}

.ashe-font-lib__wrap {
  max-width: var(--fl-max);
  margin: 0 auto;
  padding: 1.5rem 1.15rem 0;
}

/* ── Hero ── */
.ashe-font-lib__hero {
  margin-bottom: 1.5rem;
  padding: 1.65rem 1.5rem 1.4rem;
  border-radius: var(--fl-radius);
  background: var(--fl-white);
  border: 1px solid var(--fl-line);
  box-shadow: var(--fl-shadow);
}

.ashe-font-lib__hero-top {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 1.25rem 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

@media (max-width: 800px) {
  .ashe-font-lib__hero-top {
    grid-template-columns: 1fr;
  }
}

.ashe-font-lib__kicker {
  margin: 0 0 0.35rem;
  font-size: var(--ashe-wc-fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fl-moss);
  font-weight: 700;
}

.ashe-font-lib__title {
  margin: 0 0 0.55rem;
  font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fl-ink);
}

.ashe-font-lib__lead {
  margin: 0;
  max-width: 40rem;
  color: var(--fl-muted);
  font-size: var(--ashe-wc-fs-lead);
  line-height: 1.6;
}

.ashe-font-lib__hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  min-width: 220px;
}

.ashe-font-lib__stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--fl-radius-sm);
  background: var(--fl-paper);
  border: 1px solid var(--fl-line);
}

.ashe-font-lib__stat strong {
  font-size: var(--ashe-wc-fs-h3);
  font-weight: 750;
  color: var(--fl-moss-deep);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ashe-font-lib__stat span {
  font-size: var(--ashe-wc-fs-label);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fl-muted);
  font-weight: 600;
}

.ashe-font-lib__stat--ok {
  background: var(--fl-moss-soft);
  border-color: rgba(61, 92, 82, 0.2);
}

.ashe-font-lib__stat--ok strong {
  color: var(--fl-moss);
}

.ashe-font-lib__license-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--fl-radius-sm);
  background: var(--fl-moss-soft);
  border: 1px solid rgba(61, 92, 82, 0.16);
}

.ashe-font-lib__license-banner strong {
  display: block;
  font-size: var(--ashe-wc-fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fl-moss-deep);
  margin-bottom: 0.2rem;
}

.ashe-font-lib__license-banner span {
  display: block;
  font-size: var(--ashe-wc-fs-sm);
  color: var(--fl-muted);
  line-height: 1.45;
  max-width: 48rem;
}

.ashe-font-lib__license-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--fl-radius-sm);
  background: var(--fl-moss);
  color: #fff !important;
  font-size: var(--ashe-wc-fs-sm);
  font-weight: 700;
  text-decoration: none !important;
}

.ashe-font-lib__license-cta:hover {
  background: var(--fl-moss-deep);
  color: #fff !important;
}

.ashe-font-lib__intro {
  margin-bottom: 1rem;
}

/* ── Controls (fluxo normal — sem sticky) ── */
.ashe-font-lib__controls {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0 0 1.75rem;
  padding: 0.85rem 0 1.1rem;
  background: transparent;
}

.ashe-font-lib__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  position: static;
}

.ashe-font-lib__filters button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  border: 1px solid var(--fl-line);
  background: var(--fl-white);
  color: var(--fl-ink);
  font: inherit;
  font-size: var(--ashe-wc-fs-body);
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: var(--ashe-wc-radius-pill);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.ashe-font-lib__filters button em {
  font-style: normal;
  font-size: var(--ashe-wc-fs-xs);
  font-weight: 700;
  min-width: 1.35rem;
  text-align: center;
  padding: 0.1rem 0.35rem;
  border-radius: var(--ashe-wc-radius-pill);
  background: var(--fl-paper);
  color: var(--fl-muted);
  font-variant-numeric: tabular-nums;
}

.ashe-font-lib__filters button:hover {
  border-color: var(--fl-moss);
}

.ashe-font-lib__filters button.is-active {
  background: var(--fl-moss);
  border-color: var(--fl-moss);
  color: #fff;
}

.ashe-font-lib__filters button.is-active em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.ashe-font-lib__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(150px, 0.7fr) minmax(140px, 0.65fr) auto;
  gap: 0.9rem 1.15rem;
  align-items: end;
  padding: 1.15rem 1.2rem;
  border-radius: var(--fl-radius);
  border: 1px solid var(--fl-line);
  background: var(--fl-white);
  box-shadow: var(--fl-shadow);
}

@media (max-width: 900px) {
  .ashe-font-lib__toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .ashe-font-lib__field--grow {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .ashe-font-lib__toolbar {
    grid-template-columns: 1fr;
  }
}

.ashe-font-lib__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ashe-font-lib__field > span {
  font-size: var(--ashe-wc-fs-label);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fl-muted);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.ashe-font-lib__field > span output {
  font-variant-numeric: tabular-nums;
  color: var(--fl-moss);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}

.ashe-font-lib__field input[type="text"],
.ashe-font-lib__field select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--fl-line);
  border-radius: var(--fl-radius-sm);
  padding: 0 0.75rem;
  font: inherit;
  font-size: var(--ashe-wc-fs-body);
  color: var(--fl-ink);
  background: var(--fl-white);
  box-sizing: border-box;
}

.ashe-font-lib__field input[type="text"]:focus,
.ashe-font-lib__field select:focus {
  outline: none;
  box-shadow: var(--fl-focus);
  border-color: var(--fl-moss);
}

.ashe-font-lib__field input[type="range"] {
  width: 100%;
  accent-color: var(--fl-moss);
  height: 42px;
}

.ashe-font-lib__reset {
  height: 42px;
  align-self: end;
}

/* ── Sections ── */
.ashe-font-lib__section {
  margin: 0 0 2rem;
  padding: 0;
}

.ashe-font-lib__section.is-hidden {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.ashe-font-lib__section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.15rem;
}

.ashe-font-lib__section-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  font-weight: 500;
  color: var(--fl-ink);
  letter-spacing: -0.01em;
}

.ashe-font-lib__section-title small {
  font-family: var(--ashe-wc-font-sans, "Open Sans", sans-serif);
  font-size: var(--ashe-wc-fs-sm);
  font-weight: 500;
  color: var(--fl-muted);
}

.ashe-font-lib__section-mark {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--fl-moss);
  display: inline-block;
}

.ashe-font-lib__section-mark--serif { background: #6b5b4f; }
.ashe-font-lib__section-mark--display { background: #a34b3a; }
.ashe-font-lib__section-mark--mono { background: #3d4f6b; }
.ashe-font-lib__section-mark--script { background: #8a5a7a; }

.ashe-font-lib__section-sub,
.ashe-font-lib__section-count {
  margin: 0;
  font-size: var(--ashe-wc-fs-body);
  line-height: 1.5;
  color: var(--fl-muted);
  max-width: 40rem;
}

.ashe-font-lib__section--core {
  padding: 1.35rem 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--fl-radius);
  background: var(--fl-moss-soft);
  border: 1px solid var(--fl-line);
}

.ashe-font-lib__section--core .ashe-font-lib__section-title {
  color: var(--fl-moss-deep);
}

/* Grid por secção: 4 colunas no desktop (igual loja de produtos) */
.ashe-font-lib__grid,
.ashe-font-pairs__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem 1rem;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 1200px) {
  .ashe-font-lib__grid,
  .ashe-font-pairs__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 0.85rem;
  }
}

@media screen and (max-width: 900px) {
  .ashe-font-lib__grid,
  .ashe-font-pairs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 560px) {
  .ashe-font-lib__grid,
  .ashe-font-pairs__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Cards ── */
.ashe-font-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 22rem;
  padding: 1.25rem 1.15rem 1.15rem;
  border-radius: var(--fl-radius);
  border: 1px solid var(--fl-line);
  background: var(--fl-white);
  background-color: var(--fl-white);
  color: var(--fl-ink);
  box-shadow: var(--fl-shadow);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.ashe-font-card:hover {
  border-color: var(--fl-moss);
  box-shadow: var(--fl-shadow-lg);
}

.ashe-font-card--core {
  border-color: color-mix(in srgb, var(--fl-moss) 28%, var(--fl-line));
  background: var(--fl-white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fl-moss) 12%, transparent);
}

.ashe-font-card__core-ribbon {
  position: absolute;
  top: 0.75rem;
  right: -1.75rem;
  transform: rotate(35deg);
  background: var(--fl-moss);
  color: #fff;
  font-size: var(--ashe-wc-fs-2xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 2.2rem;
  box-shadow: 0 2px 8px rgba(47, 72, 64, 0.2);
  pointer-events: none;
}

.ashe-font-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  padding-right: 2.5rem;
}

.ashe-font-card--core .ashe-font-card__head {
  padding-right: 3rem;
}

.ashe-font-card__name {
  margin: 0;
  font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(1.25rem, 1.5vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.28;
  color: var(--fl-ink);
}

.ashe-font-card__cat {
  margin: 0.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ashe-font-card__cat-pill {
  display: inline-block;
  font-size: var(--ashe-wc-fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fl-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--fl-paper);
  border: 1px solid var(--fl-line);
}

.ashe-font-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--ashe-wc-fs-2xs);
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.28rem 0.48rem;
  border-radius: 5px;
  white-space: nowrap;
  line-height: 1.2;
}

.ashe-font-badge--ofl {
  background: var(--fl-moss-soft);
  color: var(--fl-moss-deep);
  border: 1px solid rgba(61, 92, 82, 0.15);
}

.ashe-font-badge--core {
  background: var(--fl-moss);
  color: #fff;
}

/* Preview */
.ashe-font-card__preview-box {
  position: relative;
  margin: 0;
  padding: 1.25rem 1.1rem 1.7rem;
  border-radius: var(--fl-radius-sm);
  background: var(--fl-paper);
  border: 1px solid var(--fl-line);
  min-height: 5.5rem;
  height: auto;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.ashe-font-card__sample {
  margin: 0;
  width: 100%;
  line-height: 1.25;
  font-size: clamp(1.75rem, 2.2vw, 2.15rem);
  font-weight: 400;
  word-break: break-word;
  color: var(--fl-ink);
  transition: font-size 0.08s ease, font-weight 0.08s ease;
}

.ashe-font-card__preview-meta {
  position: absolute;
  right: 0.65rem;
  bottom: 0.4rem;
  font-size: var(--ashe-wc-fs-2xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fl-muted);
  font-variant-numeric: tabular-nums;
}

/* Info */
.ashe-font-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
}

.ashe-font-card__info-label {
  display: block;
  font-size: var(--ashe-wc-fs-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fl-muted);
  margin-bottom: 0.25rem;
}

.ashe-font-card__use {
  margin: 0;
  font-size: var(--ashe-wc-fs-body);
  color: var(--fl-ink);
  line-height: 1.5;
}

.ashe-font-card__info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--fl-line);
}

.ashe-font-card__info-grid p {
  margin: 0;
  font-size: var(--ashe-wc-fs-body);
  color: var(--fl-ink);
  line-height: 1.4;
}

.ashe-font-card__lic-link {
  margin-left: 0.3rem;
  font-size: var(--ashe-wc-fs-xs);
  font-weight: 650;
  color: var(--fl-moss);
  text-decoration: none;
}

.ashe-font-card__lic-link:hover {
  text-decoration: underline;
}

/* Actions — sempre no rodapé do cartão (altura visual consistente) */
.ashe-font-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.55rem;
}

@media (max-width: 380px) {
  .ashe-font-card__actions {
    grid-template-columns: 1fr;
  }
}

.ashe-font-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  border: 1px solid var(--fl-moss);
  background: var(--fl-moss);
  color: #fff !important;
  font: inherit;
  font-size: var(--ashe-wc-fs-body);
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: var(--fl-radius-sm);
  cursor: pointer;
  text-decoration: none !important;
  line-height: 1.2;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  text-align: center;
}

.ashe-font-btn:hover {
  background: var(--fl-moss-deep);
  border-color: var(--fl-moss-deep);
  color: #fff !important;
}

.ashe-font-btn--primary {
  grid-column: 1 / -1;
  min-height: 44px;
  font-size: var(--ashe-wc-fs-sm);
  background: var(--fl-moss-deep);
  border-color: var(--fl-moss-deep);
  box-shadow: 0 4px 12px rgba(47, 72, 64, 0.18);
}

.ashe-font-btn--primary:hover {
  filter: brightness(1.06);
}

.ashe-font-btn--secondary {
  background: var(--fl-white);
  color: var(--fl-moss-deep) !important;
  border-color: rgba(61, 92, 82, 0.35);
}

.ashe-font-btn--secondary:hover {
  background: var(--fl-moss-soft);
  color: var(--fl-moss-deep) !important;
  border-color: var(--fl-moss);
}

.ashe-font-btn--ghost {
  background: var(--fl-white);
  color: var(--fl-moss-deep) !important;
  border-color: var(--fl-line);
  font-weight: 650;
}

.ashe-font-btn--ghost:hover {
  background: var(--fl-paper);
  border-color: rgba(61, 92, 82, 0.3);
  color: var(--fl-moss-deep) !important;
}

.ashe-font-btn.is-copied {
  background: #2a6b4e !important;
  border-color: #2a6b4e !important;
  color: #fff !important;
}

.ashe-font-card__weights {
  font-size: var(--ashe-wc-fs-sm);
  color: var(--fl-muted);
  border-radius: var(--fl-radius-sm);
  background: var(--fl-paper);
  border: 1px solid var(--fl-line);
  padding: 0.3rem 0.7rem;
}

.ashe-font-card__weights summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--fl-ink);
  padding: 0.3rem 0;
}

.ashe-font-card__weights ul {
  margin: 0.25rem 0 0.45rem;
  padding: 0 0 0 1rem;
}

.ashe-font-card__weights a {
  color: var(--fl-moss);
  font-weight: 600;
  text-decoration: none;
}

.ashe-font-card__weights a:hover {
  text-decoration: underline;
}

.ashe-font-card__source {
  margin: 0;
  font-size: var(--ashe-wc-fs-xs);
  color: var(--fl-muted);
  line-height: 1.35;
}

/* Footer resources */
.ashe-font-lib__resources {
  margin-top: 1.25rem;
  padding: 1.35rem 1.35rem 1.2rem;
  border-radius: var(--fl-radius);
  border: 1px solid var(--fl-line);
  background: var(--fl-white);
  box-shadow: var(--fl-shadow);
}

.ashe-font-lib__resources-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem 2rem;
}

@media (max-width: 700px) {
  .ashe-font-lib__resources-grid {
    grid-template-columns: 1fr;
  }
}

.ashe-font-lib__resources h2 {
  margin: 0 0 0.6rem;
  font-size: var(--ashe-wc-fs-lead);
  font-weight: 750;
}

.ashe-font-lib__howto {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--fl-muted);
  line-height: 1.55;
  font-size: var(--ashe-wc-fs-body);
}

.ashe-font-lib__resources ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--fl-muted);
  line-height: 1.55;
  font-size: var(--ashe-wc-fs-body);
}

.ashe-font-lib__resources a {
  color: var(--fl-moss);
  font-weight: 650;
}

.ashe-font-lib__note {
  margin: 1.1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--fl-line);
  font-size: var(--ashe-wc-fs-sm);
  color: var(--fl-muted);
}

/* Dark mode (Ashe body.ashe-dark-mode) — tokens + superfícies explícitas */
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib,
body.ashe-dark-mode .ashe-font-lib,
body.dark-mode .ashe-font-lib {
  --fl-paper: var(--ashe-dm-elevated, #1f2228);
  --fl-white: var(--ashe-dm-surface, #16181c);
  --fl-ink: var(--ashe-dm-text, #f3f0ec);
  --fl-muted: var(--ashe-dm-text-3, #87837d);
  --fl-line: var(--ashe-dm-border, #2e3238);
  --fl-moss: var(--ashe-dm-accent, #cbb79c);
  --fl-moss-deep: var(--ashe-dm-accent-deep, #a99174);
  --fl-moss-soft: rgba(203, 183, 156, 0.14);
  --fl-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 10px 24px rgba(0, 0, 0, 0.22);
  --fl-shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.32), 0 16px 36px rgba(0, 0, 0, 0.28);
  --fl-focus: 0 0 0 3px rgba(203, 183, 156, 0.28);
  color: var(--fl-ink);
  background: transparent;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-card,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-card--core,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__hero,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__toolbar,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__filters button,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__field input[type="text"],
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__field select,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__stat,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-btn--secondary,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-btn--ghost,
body.ashe-dark-mode .ashe-font-card,
body.ashe-dark-mode .ashe-font-card--core,
body.ashe-dark-mode .ashe-font-lib__hero,
body.ashe-dark-mode .ashe-font-lib__toolbar,
body.ashe-dark-mode .ashe-font-lib__filters button,
body.ashe-dark-mode .ashe-font-lib__field input[type="text"],
body.ashe-dark-mode .ashe-font-lib__field select {
  background: var(--fl-white);
  background-color: var(--fl-white);
  border-color: var(--fl-line);
  color: var(--fl-ink);
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-card__preview-box,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-pair__preview,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-card__cat-pill,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-card__weights,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__filters button em,
body.ashe-dark-mode .ashe-font-card__preview-box,
body.ashe-dark-mode .ashe-font-pair__preview {
  background: var(--fl-paper);
  border-color: var(--fl-line);
  color: var(--fl-ink);
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-card__name,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-card__sample,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__title,
body.ashe-dark-mode .ashe-font-card__name,
body.ashe-dark-mode .ashe-font-card__sample {
  color: var(--fl-ink);
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__filters button.is-active,
body.ashe-dark-mode .ashe-font-lib__filters button.is-active {
  background: var(--fl-moss);
  border-color: var(--fl-moss);
  color: #14120f;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__filters button.is-active em,
body.ashe-dark-mode .ashe-font-lib__filters button.is-active em {
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-btn--primary,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-btn:not(.ashe-font-btn--secondary):not(.ashe-font-btn--ghost),
body.ashe-dark-mode .ashe-font-btn--primary {
  background: var(--fl-moss);
  border-color: var(--fl-moss);
  color: #14120f;
  box-shadow: none;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-btn--secondary,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-btn--ghost,
body.ashe-dark-mode .ashe-font-btn--secondary,
body.ashe-dark-mode .ashe-font-btn--ghost {
  color: var(--fl-moss) !important;
  border-color: var(--fl-line);
  background: var(--fl-white);
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__section--core,
body.ashe-dark-mode .ashe-font-lib__section--core {
  background: var(--fl-paper);
  border-color: var(--fl-line);
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-lib__controls,
body.ashe-dark-mode .ashe-font-lib__controls {
  background: transparent;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-font-mockup--folder .ashe-font-mockup__stage,
body.ashe-dark-mode .ashe-font-mockup--folder .ashe-font-mockup__stage {
  background: var(--fl-white);
  color: var(--fl-ink);
}

/* ── Search ── */
.ashe-font-lib__search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.7rem;
}

.ashe-font-lib__search {
  flex: 1 1 240px;
  min-width: 0;
}

.ashe-font-lib__search input[type="search"] {
  width: 100%;
  height: 44px;
  border: 1px solid var(--fl-line);
  border-radius: var(--ashe-wc-radius-pill);
  padding: 0 1.1rem;
  font: inherit;
  font-size: var(--ashe-wc-fs-body);
  color: var(--fl-ink);
  background: var(--fl-white);
  box-sizing: border-box;
}

.ashe-font-lib__search input[type="search"]:focus {
  outline: 2px solid rgba(61, 92, 82, 0.35);
  border-color: var(--fl-moss);
}

.ashe-font-lib__result-count {
  margin: 0;
  font-size: var(--ashe-wc-fs-sm);
  color: var(--fl-muted);
  font-weight: 600;
  min-height: 1.2em;
}

/* ── Use filters ── */
.ashe-font-lib__use-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
}

.ashe-font-lib__use-label {
  font-size: var(--ashe-wc-fs-label);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fl-muted);
  margin-right: 0.25rem;
}

.ashe-font-lib__use-filters button {
  border: 1px dashed var(--fl-line);
  background: transparent;
  color: var(--fl-ink);
  font: inherit;
  font-size: var(--ashe-wc-fs-xs);
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: var(--ashe-wc-radius-pill);
  cursor: pointer;
  transition: 0.12s ease;
}

.ashe-font-lib__use-filters button:hover {
  border-color: var(--fl-moss);
  color: var(--fl-moss-deep);
}

.ashe-font-lib__use-filters button.is-active {
  border-style: solid;
  border-color: var(--fl-moss);
  background: var(--fl-moss-soft);
  color: var(--fl-moss-deep);
}

/* ── Favorites ── */
.ashe-font-card__head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.ashe-font-fav {
  appearance: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--fl-line);
  border-radius: 50%;
  background: var(--fl-white);
  color: var(--fl-muted);
  font-size: var(--ashe-wc-fs-h3);
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.12s ease;
  padding: 0;
}

.ashe-font-fav:hover {
  border-color: var(--fl-moss);
  color: var(--fl-moss);
}

.ashe-font-fav.is-on {
  background: var(--fl-moss-soft);
  border-color: var(--fl-moss);
  color: var(--fl-moss-deep);
}

.ashe-font-card.is-hidden-filter {
  display: none !important;
}

.ashe-font-lib__empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--fl-muted);
  font-size: var(--ashe-wc-fs-body);
  border: 1px dashed var(--fl-line);
  border-radius: var(--fl-radius);
  background: var(--fl-white);
  margin: 0 0 1.5rem;
}

.ashe-font-lib__empty.is-hidden,
.ashe-font-lib__empty[hidden] {
  display: none !important;
}

/* ── Tags on card ── */
.ashe-font-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ashe-font-tag {
  appearance: none;
  border: 1px solid var(--fl-line);
  background: var(--fl-paper);
  color: var(--fl-moss-deep);
  font: inherit;
  font-size: var(--ashe-wc-fs-label);
  font-weight: 650;
  padding: 0.22rem 0.5rem;
  border-radius: var(--ashe-wc-radius-pill);
  cursor: pointer;
  line-height: 1.2;
}

.ashe-font-tag:hover {
  border-color: var(--fl-moss);
  background: var(--fl-moss-soft);
}

/* ── Mockups ── */
.ashe-font-card__mockups {
  border: 1px solid var(--fl-line);
  border-radius: var(--fl-radius-sm);
  background: var(--fl-paper);
  padding: 0.35rem 0.7rem 0.55rem;
}

.ashe-font-card__mockups summary {
  cursor: pointer;
  font-size: var(--ashe-wc-fs-sm);
  font-weight: 700;
  color: var(--fl-moss-deep);
  padding: 0.35rem 0;
}

.ashe-font-mockups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

@media (max-width: 420px) {
  .ashe-font-mockups {
    grid-template-columns: 1fr;
  }
}

.ashe-font-mockup {
  margin: 0;
  border-radius: var(--ashe-wc-radius-sm);
  overflow: hidden;
  border: 1px solid var(--fl-line);
  background: var(--fl-white);
}

.ashe-font-mockup figcaption {
  font-size: var(--ashe-wc-fs-2xs);
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fl-muted);
  padding: 0.3rem 0.45rem 0.15rem;
}

.ashe-font-mockup__stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-height: 72px;
  padding: 0.5rem 0.55rem 0.6rem;
  line-height: 1.15;
}

.ashe-font-mockup__l1 { font-weight: 700; font-size: var(--ashe-wc-fs-body); }
.ashe-font-mockup__l2 { font-size: var(--ashe-wc-fs-xs); opacity: 0.9; }
.ashe-font-mockup__l3 { font-size: var(--ashe-wc-fs-2xs); opacity: 0.7; }

.ashe-font-mockup--card .ashe-font-mockup__stage {
  background: linear-gradient(135deg, #faf8f4, #efeae2);
  min-height: 78px;
}
.ashe-font-mockup--card .ashe-font-mockup__l1 { font-size: var(--ashe-wc-fs-sm); }
.ashe-font-mockup--card .ashe-font-mockup__l2 { font-size: var(--ashe-wc-fs-label); font-weight: 500; }

.ashe-font-mockup--banner .ashe-font-mockup__stage {
  background: linear-gradient(90deg, var(--fl-moss-deep), var(--fl-moss));
  color: #fff;
  min-height: 70px;
  text-align: center;
  align-items: center;
}
.ashe-font-mockup--banner .ashe-font-mockup__l1 {
  font-size: var(--ashe-wc-fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ashe-font-mockup--banner .ashe-font-mockup__l2 { font-size: var(--ashe-wc-fs-xs); font-weight: 500; }
.ashe-font-mockup--banner .ashe-font-mockup__l3 { font-size: var(--ashe-wc-fs-2xs); opacity: 0.85; }

.ashe-font-mockup--tshirt .ashe-font-mockup__stage {
  background: #1f2421;
  color: #f5f2ea;
  text-align: center;
  align-items: center;
  min-height: 80px;
  border-radius: 0 0 40% 40% / 0 0 12% 12%;
}
.ashe-font-mockup--tshirt .ashe-font-mockup__l1 {
  font-size: var(--ashe-wc-fs-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
}
.ashe-font-mockup--tshirt .ashe-font-mockup__l2 {
  font-size: var(--ashe-wc-fs-xs);
  font-style: italic;
  opacity: 0.85;
}

.ashe-font-mockup--folder .ashe-font-mockup__stage {
  background: var(--fl-white);
  border-left: 3px solid var(--fl-moss);
  min-height: 88px;
}
.ashe-font-mockup--folder .ashe-font-mockup__l1 { font-size: var(--ashe-wc-fs-sm); font-weight: 750; }
.ashe-font-mockup--folder .ashe-font-mockup__l2 {
  font-size: var(--ashe-wc-fs-2xs);
  line-height: 1.35;
  opacity: 0.88;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ashe-font-mockup--folder .ashe-font-mockup__l3 {
  font-size: var(--ashe-wc-fs-2xs);
  font-weight: 650;
  color: var(--fl-moss);
  opacity: 1;
}

/* ── Pairs ── */
.ashe-font-lib__pairs {
  margin-bottom: 1.85rem;
  padding: 1.35rem 1.25rem 1.45rem;
  border-radius: var(--fl-radius);
  border: 1px solid var(--fl-line);
  background: var(--fl-white);
  box-shadow: var(--fl-shadow);
}

/* pares usam o mesmo grid 1/2/3 definido em .ashe-font-pairs__grid acima */

.ashe-font-pair {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  padding: 1.35rem 1.25rem;
  border-radius: var(--fl-radius);
  border: 1px solid var(--fl-line);
  background: var(--fl-white);
}

.ashe-font-pair__head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ashe-font-pair__head h3 {
  margin: 0;
  font-size: var(--ashe-wc-fs-lead);
  font-weight: 750;
}

.ashe-font-pair__best {
  font-size: var(--ashe-wc-fs-xs);
  font-weight: 650;
  color: var(--fl-moss);
  letter-spacing: 0.02em;
}

.ashe-font-pair__preview {
  padding: 0.85rem 0.9rem;
  border-radius: var(--fl-radius-sm);
  border: 1px solid var(--fl-line);
  background: var(--fl-paper);
  min-height: 110px;
}

.ashe-font-pair__headline {
  margin: 0 0 0.45rem;
  font-size: var(--ashe-wc-fs-h4);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.ashe-font-pair__body {
  margin: 0;
  font-size: var(--ashe-wc-fs-sm);
  line-height: 1.45;
  color: var(--fl-ink);
  opacity: 0.92;
}

.ashe-font-pair__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-size: var(--ashe-wc-fs-xs);
  color: var(--fl-muted);
}

.ashe-font-pair__meta strong {
  color: var(--fl-ink);
  margin-right: 0.2rem;
}

.ashe-font-pair__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ashe-font-pair__actions .ashe-font-btn {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--ashe-wc-fs-xs);
  min-height: 36px;
}

/* screen reader */
.ashe-font-lib .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.ashe-dark-mode .ashe-font-mockup--banner .ashe-font-mockup__stage,
body.dark-mode .ashe-font-mockup--banner .ashe-font-mockup__stage {
  color: var(--fl-ink);
}

/* —— Dentro do hub Acervo: largura total + sem padding duplo —— */
.ashe-acervo .ashe-font-lib {
  background: transparent;
  padding: 0 0 1rem;
  max-width: none;
  width: 100%;
}

.ashe-acervo .ashe-font-lib__wrap {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.ashe-acervo .ashe-font-lib__hero {
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.6rem 1.5rem;
}

.ashe-acervo .ashe-font-lib__controls {
  margin-bottom: 1.5rem;
  padding: 0.5rem 0 0.75rem;
}

.ashe-acervo .ashe-font-lib__filters,
.ashe-acervo .ashe-font-lib__search-row {
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.ashe-acervo .ashe-font-lib__section {
  margin-bottom: 1.85rem;
}

.ashe-acervo .ashe-font-lib__grid,
.ashe-acervo .ashe-font-pairs__grid {
  width: 100%;
}
