/* Magazzino e prodotti lane: section-specific styles (shared components live in private.css). */

/* Catalog list: search lives in the shared filter bar, price comparison in a compact toolbar. */
.catalog-filter { align-items:flex-end; }
.catalog-filter .filter-fields { flex:1 1 320px; }
.catalog-filter label.filter-wide { flex:1 1 320px; max-width:520px; }
.catalog-filter .filter-actions { flex:0 0 auto; }
.catalog-compare { display:block; }
.catalog-compare .panel-title { margin:0 0 var(--s2); }
.catalog-compare .catalog-search { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--s2) var(--s3); border:0; padding:0; margin:0; background:none; box-shadow:none; }
.catalog-compare .catalog-search label { flex:1 1 320px; max-width:520px; font-size:13px; font-weight:600; color:var(--muted); }
.catalog-compare .catalog-search input { font-weight:400; color:var(--ink); }
.catalog-compare .compare-result { margin-top:var(--s3); }
.catalog-compare .compare-result p { margin:0 0 var(--s2); }
.page-header-note { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s2); margin:0; }
.chip-row .badge, .product-body .chip-row .badge { align-self:center; }
.chip-row { align-items:center; }
.empty-state .button-row { justify-content:center; }
.empty-state.stock-deferred { padding:var(--s8) var(--s5); }

/* Product cards: price is a badge when missing; keep the grid, tighten the card chrome. */
.product-card.is-archived { opacity:1; border-style:dashed; }
.product-card.is-archived .product-thumb { opacity:.6; }
.product-price { font-variant-numeric:tabular-nums; }
.product-meta .badge { font-size:12px; }

/* Product detail */
.product-side .description-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s3) var(--s4); margin:0; }
.product-layout .panel > h2 { font-size:17px; }
.result-list { list-style:none; margin:var(--s4) 0; padding:0; display:grid; gap:var(--s3); }
.result-list > li { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:var(--s3) var(--s4); box-shadow:var(--shadow); }
.result-list > li p { margin:var(--s1) 0 var(--s2); color:var(--muted); }
.catalog-form { max-width:860px; }
.catalog-form .form-actions { margin-top:var(--s4); }
.card > .data-table { border:0; border-radius:0; margin:0; }
.card > .data-table thead th:first-child, .card > .data-table thead th:last-child { border-radius:0; }

@media (max-width:767px) {
  .page-header-note { flex-direction:row; }
  .catalog-filter .filter-actions { width:100%; }
  .catalog-compare .catalog-search label { flex:1 1 100%; max-width:none; }
  .catalog-compare .catalog-search button { width:100%; }
  .product-grid { grid-template-columns:1fr; gap:var(--s3); margin:var(--s3) 0; }
  /* Phone: compact list rows (thumbnail left, text right) so a long catalog is quick to scan. */
  .product-card > a { flex-direction:row; align-items:stretch; }
  .product-card .product-thumb, .product-card .product-thumb:has(.product-noimg) { flex:0 0 96px; width:96px; height:auto; aspect-ratio:auto; min-height:96px; }
  .product-card .product-noimg { font-size:28px; }
  .product-body { padding:var(--s3); gap:2px; min-width:0; }
  .product-title { font-size:16px; }
  .product-body > .muted { margin-bottom:var(--s1); overflow-wrap:anywhere; }
  .product-meta { padding-top:var(--s2); }
  .catalog-categories .chip-list { flex-wrap:nowrap; overflow-x:auto; padding-bottom:var(--s2); }
  .catalog-categories .chip-link { white-space:nowrap; }
  .product-side .description-list { grid-template-columns:1fr 1fr; }
}
/* Scripts add a status paragraph as the first form child; it must not take a grid cell. */
.form-grid > p { grid-column:1 / -1; margin:0; }
.form-grid > p:empty { display:none; }
.catalog-form label:has(textarea) { grid-column:1 / -1; }
.catalog-form label:has(input[type=checkbox]) { display:flex; align-items:center; gap:var(--s2); }
.catalog-form textarea { min-height:96px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:13px; }
