/* Category, shop and product search pages (woocommerce/archive-product.php). */

/* Head: icon, the one H1, the old hero line as the intro, the hero photo */
.cat-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 48px; align-items: center; padding-block: 8px 32px; }
.cat-head__txt { display: grid; gap: 14px; justify-items: start; }
.cat-head__icon img { display: block; width: 56px; height: 56px; object-fit: contain; }
.cat-head h1 { font-size: var(--t-3xl); font-weight: var(--fw-h); letter-spacing: -.02em; }
.cat-head__intro { font-size: var(--t-l); line-height: 1.45; color: var(--muted); max-width: 46ch; }
.cat-head__img { margin: 0; }
.cat-head__img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-lg); }
.cat-head:not(:has(.cat-head__img)) { grid-template-columns: 1fr; }

/* Copy rows on a plugin page sit under the plugin's own layout */
.cat-page--plugin .cat-rows { padding-top: 0; }

/* Products: count and sort, the grid, pagination */
.cat-products { padding-block: 16px 48px; }
.tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-bottom: 20px; }
.tools .woocommerce-notices-wrapper:empty { display: none; }
.tools .woocommerce-result-count { margin: 0; color: var(--muted); font-size: var(--t-s); }
.tools .woocommerce-ordering { margin: 0; }
.tools .orderby { min-height: 52px; padding: 0 14px; border: 2px solid var(--line-strong); border-radius: var(--btn-radius); background: #fff; font: var(--t-b) var(--font); color: var(--navy); }
.cat-grid__help { min-width: 0; }
.woocommerce-pagination { margin-top: 32px; }
.woocommerce-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-pagination a, .woocommerce-pagination span { display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 0 12px; border: 2px solid var(--line-strong); border-radius: var(--btn-radius); text-decoration: none; font-weight: var(--fw-m); }
.woocommerce-pagination a:hover { border-color: var(--navy); background: var(--mist); }
.woocommerce-pagination .current { border-color: var(--navy); background: var(--navy); color: #fff; }
.woocommerce-info { padding: 16px 20px; border-radius: var(--radius); background: var(--mist); }

@media (max-width: 759px) {
  .cat-head { grid-template-columns: 1fr; gap: 20px; }
  .cat-head h1 { font-size: var(--t-2xl); }
  .cat-head__img { order: -1; }
  .tools { align-items: stretch; flex-direction: column; }
  .tools .orderby { width: 100%; }
}
