/* Catalog and saved products share the existing theme tokens. */
.product-grid,.favorites-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-5); align-items:stretch; }
.product-card,.favorite-card { display:flex; flex-direction:column; min-width:0; }
.product-card-button { display:flex; flex:1; flex-direction:column; width:100%; min-width:0; }
.product-card .card-image,.favorite-card .favorite-image { width:100%; aspect-ratio:4/3; flex:none; background:var(--surface-subtle); overflow:hidden; }
.product-card .image-wrapper img,.detail-gallery .image-wrapper img { width:100%; height:100%; object-fit:contain; }
.card-info { display:flex; flex:1; flex-direction:column; width:100%; min-width:0; padding-top:var(--space-3); }
.card-info h3,.favorite-content h2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; white-space:normal; min-height:3em; max-height:3em; line-height:1.5; margin:var(--space-2) 0; overflow-wrap:anywhere; }
.card-topline { gap:var(--space-2); font-size:var(--text-xs); flex-wrap:wrap; min-height:2em; color:var(--muted); }
.card-description,.favorite-params { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; white-space:normal; min-height:3.3em; max-height:3.3em; line-height:1.65; font-size:var(--text-sm); color:var(--muted); margin:0 0 var(--space-3); overflow-wrap:anywhere; }
.card-topline > *, .card-bottom > *, .card-shopping-actions > * { min-width:0; max-width:100%; }
.card-shopping-actions :is(a,button) { overflow-wrap:anywhere; white-space:normal; }
.catalog-controls, .catalog-controls .search-sort { min-width:0; max-width:100%; }
.catalog-controls .search-sort { flex-wrap:wrap; }
.card-bottom { margin-top:auto; display:flex; flex-wrap:wrap; align-items:center; min-height:54px; }
.card-price { font-size:clamp(20px,2vw,28px); flex-wrap:wrap; }
.card-arrow { display:none; }
.product-availability { width:fit-content; max-width:100%; font-size:var(--text-xs); border-radius:var(--radius-input); padding:var(--space-1) var(--space-2); margin:0 0 var(--space-3); overflow-wrap:anywhere; }
.status-success { color:var(--success); background:var(--success-soft); }
.status-warning { color:var(--warning); background:var(--warning-soft); }
.status-danger { color:var(--danger); background:var(--danger-soft); }
.card-shopping-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); margin-top:var(--space-3); }
.card-shopping-actions button,.card-shopping-actions a { min-height:40px; padding:var(--space-2); border:1px solid var(--line); border-radius:var(--radius-input); background:var(--white); font-size:var(--text-xs); color:var(--ink); text-decoration:none; }
.card-shopping-actions .card-add { margin-left:auto; color:var(--brand-strong); background:var(--brand-soft); border-color:var(--brand-border); }
.card-shopping-actions button:disabled { cursor:not-allowed; }
.active-filters { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); margin:var(--space-4) 0; color:var(--muted); font-size:var(--text-xs); }
.filter-chip { max-width:100%; overflow-wrap:anywhere; border:1px solid var(--brand-border); border-radius:var(--radius-pill); padding:var(--space-2) var(--space-3); color:var(--brand-strong); background:var(--brand-soft); }
.detail-main-image { aspect-ratio:1; max-height:560px; background:var(--surface-subtle); }
.detail-gallery { align-self:start; min-width:0; }
.detail-gallery .detail-thumbnails { flex-wrap:wrap; }
.detail-quantity { display:flex; align-items:center; gap:var(--space-4); margin:var(--space-5) 0 var(--space-3); font-size:var(--text-sm); }
.detail-quantity input { width:90px; min-height:var(--control-height); padding:var(--space-2); border:1px solid var(--line); border-radius:var(--radius-input); background:var(--white); }
.detail-service-note,.cart-product-params { color:var(--muted); font-size:var(--text-xs); line-height:var(--line-body); overflow-wrap:anywhere; }
.cart-product-title,.cart-product-params { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.detail-info .detail-actions { position:static; flex-wrap:wrap; gap:var(--space-3); background:var(--white); padding-block:var(--space-3); }
.detail-actions>button:disabled { cursor:not-allowed; }
.detail-extra-actions { flex-wrap:wrap; }
.favorites-controls { flex-wrap:wrap; }
.favorites-controls select { min-height:var(--control-height); }
.favorite-content { display:flex; flex:1; flex-direction:column; }
.favorite-actions { margin-top:auto; }
.favorite-actions .primary-button:disabled { cursor:not-allowed; }
@media(max-width:1100px) {
  .product-grid,.favorites-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  .product-grid,.favorites-grid { grid-template-columns:1fr; gap:var(--space-4); }
  .product-card .card-image,.favorite-card .favorite-image { aspect-ratio:4/3; }
  .card-info h3,.favorite-content h2 { font-size:var(--text-base); min-height:0; }
  .card-topline,.card-shopping-actions button,.card-shopping-actions a { font-size:var(--text-xs); }
  .card-shopping-actions>* { flex:1; text-align:center; }
  .card-description,.favorite-params { min-height:0; }
  .product-card .card-image-action { display:block; }
  .detail-main-image { max-height:360px; aspect-ratio:1; }
  .detail-actions>button { flex:1 1 45%; white-space:normal; }
}
