/* review.56-shop-compare-cards (base review.55 / review.52-rev2) — /shop/ compare as product cards + topic tags.
   Replaces sticky 16-col matrix. Uses site tokens from ngogrant-site.css. Shop-only enqueue. */

.ngg-compare {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: none;
  color: var(--ng-ink);
}

.ngg-compare > h2 {
  margin-bottom: 0.75rem;
}

.ngg-compare > p {
  color: var(--ng-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.ngg-compare__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ng-line);
  border-radius: 12px;
  background: var(--ng-soft);
  font-size: 0.9rem;
  color: var(--ng-ink);
}

.ngg-compare__legend-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ngg-compare__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .ngg-compare__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ngg-compare__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--ng-line);
  border-radius: var(--ng-radius);
  background: var(--ng-white);
  box-shadow: 0 8px 24px #3023310a;
}

.ngg-compare__card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
}

.ngg-compare__title {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 650;
  color: var(--ng-plum);
}

.ngg-compare__title a {
  color: inherit;
  text-decoration: none;
}

.ngg-compare__title a:hover {
  text-decoration: underline;
}

.ngg-compare__title a:focus-visible {
  outline: 3px solid var(--ng-plum);
  outline-offset: 3px;
  border-radius: 4px;
}

.ngg-compare__price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ng-plum);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}

.ngg-compare__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.ngg-compare__badge--complete {
  background: var(--ng-plum);
  color: var(--ng-white);
  border-color: var(--ng-plum);
}

.ngg-compare__badge--in-toolkit {
  background: var(--ng-soft);
  color: var(--ng-plum);
  border-color: var(--ng-line);
}

.ngg-compare__badge--not-in-toolkit {
  background: #FFF1D7;
  color: #624014;
  border-color: var(--ng-amber);
}

.ngg-compare__tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ngg-compare__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.ngg-compare__tag--full {
  background: var(--ng-plum);
  color: var(--ng-white);
  border: 1px solid var(--ng-plum);
}

.ngg-compare__tag--partial {
  background: var(--ng-white);
  color: var(--ng-plum);
  border: 1.5px solid var(--ng-plum);
}

.ngg-compare__tag-hint {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: lowercase;
  opacity: 0.85;
  letter-spacing: 0.01em;
}

.ngg-compare__tag--partial .ngg-compare__tag-hint {
  color: var(--ng-muted);
}

.ngg-compare__overlaps {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ng-muted);
  overflow-wrap: anywhere;
}

.ngg-compare__cta {
  margin: 0.15rem 0 0;
  font-weight: 650;
  font-size: 0.92rem;
}

.ngg-compare__cta a {
  color: var(--ng-plum);
  text-underline-offset: 4px;
}

.ngg-compare__cta a:focus-visible {
  outline: 3px solid var(--ng-plum);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Footer notes under the card list (unchanged substance from prior compare section) */
.ngg-compare > p:last-of-type,
.ngg-compare > p:nth-last-of-type(2) {
  margin-top: 1.1rem;
}
