diff --git a/make_post_sell/static/css/common.css b/make_post_sell/static/css/common.css index 0636279..2f27df9 100644 --- a/make_post_sell/static/css/common.css +++ b/make_post_sell/static/css/common.css @@ -1482,10 +1482,10 @@ section.serp-list { } article.serp-list-row { display: grid; - grid-template-columns: 80px minmax(0, 1fr); - gap: var(--space-3, 12px); + grid-template-columns: 140px minmax(0, 1fr); + gap: var(--space-4, 16px); align-items: start; - padding: var(--space-2, 8px); + padding: var(--space-3, 12px); border-radius: var(--radius-sm, 4px); transition: background-color 200ms ease; } @@ -1531,7 +1531,10 @@ p.serp-list-excerpt { color: var(--text-color, #333); font-size: var(--type-body-sm-size, 0.875rem); line-height: 1.5; - max-width: 70ch; + /* No max-width — the excerpt fills the row body so the layout uses + the full screen real estate the facet sidebar frees up. The + 6-sentence cap (Product.excerpt_sentences) keeps the block from + running unbounded. */ } [data-theme="dark"] article.serp-list-row:hover { background-color: var(--dark-button-bg, #2d3748); @@ -1541,8 +1544,8 @@ p.serp-list-excerpt { grows. The parent .serp-list is the query container. */ @container (min-width: 600px) { article.serp-list-row { - grid-template-columns: 120px minmax(0, 1fr); - gap: var(--space-4, 16px); + grid-template-columns: 200px minmax(0, 1fr); + gap: var(--space-5, 20px); } h3.serp-list-title { font-size: var(--type-title-size, 1.25rem); @@ -1550,7 +1553,12 @@ p.serp-list-excerpt { } @container (min-width: 900px) { article.serp-list-row { - grid-template-columns: 160px minmax(0, 1fr); + grid-template-columns: 260px minmax(0, 1fr); + } +} +@container (min-width: 1200px) { + article.serp-list-row { + grid-template-columns: 320px minmax(0, 1fr); } } @@ -1942,7 +1950,12 @@ ul.facet-tag-list { } ul.facet-tag-list li { margin: 0; } a.facet-tag { - display: block; + /* name on the left (1fr, can wrap), hit-count chip on the right + (auto). Grid only. */ + display: grid; + grid-template-columns: 1fr auto; + align-items: center; + gap: var(--space-2, 8px); padding: var(--space-2, 8px) var(--space-3, 12px); border-radius: var(--radius-sm, 4px); color: var(--text-color, #333); @@ -1950,6 +1963,24 @@ a.facet-tag { transition: background-color 150ms ease; word-break: break-word; } +span.facet-tag-count { + /* Hit count per category — muted pill so the eye reads names + first, counts second. */ + color: var(--text-muted, #6b7280); + font-size: var(--type-body-sm-size, 0.8125rem); + font-variant-numeric: tabular-nums; + background: var(--surface-dim, #f3f4f6); + padding: 0 var(--space-2, 8px); + border-radius: var(--radius-pill, 999px); + min-width: 1.5rem; + text-align: center; +} +a.facet-tag-active span.facet-tag-count { + /* On the active row the chip inverts so it stays legible against + the themed background. */ + background: rgba(255, 255, 255, 0.25); + color: var(--shop-theme-text-color, #fff); +} a.facet-tag:hover { background: var(--surface-dim, #f3f4f6); } diff --git a/make_post_sell/templates/_facet_nav.j2 b/make_post_sell/templates/_facet_nav.j2 index 36c2ae0..cb972f3 100644 --- a/make_post_sell/templates/_facet_nav.j2 +++ b/make_post_sell/templates/_facet_nav.j2 @@ -76,7 +76,10 @@
  • {{ t.name }} + rel="nofollow"> + {{ t.name }} + {{ t.product_count }} +
  • {% endfor %}