/* HygINOX 1.0.12 – readable four-column specifications and configurable PDF positioning.
 * Only HygINOX product catalogue cards; no global WooCommerce / theme selectors.
 * --hxd-spec-cols is emitted by the Design Manager separately for list, homepage and grid.
 */

/* Four values can stay on one row without reducing the text size. */
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-specs,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-specs {
  display:grid;
  grid-template-columns:repeat(var(--hxd-spec-cols, 4),minmax(0,1fr));
  gap:14px 12px;
  align-items:start;
}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-spec,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-spec {
  min-width:0;
  align-items:flex-start;
  gap:8px;
}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-spec > span:last-child,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-spec > span:last-child {
  min-width:0;
  overflow-wrap:break-word;
}

/* Default: documents and CTAs form a single group against the right edge.
 * PDF 1 starts immediately to the left of the first button. New PDFs grow leftwards.
 * HTML order is untouched; only CSS alignment/direction changes.
 */
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-bottom,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-bottom {
  display:flex;
  flex-flow:row wrap;
  align-items:center;
  justify-content:flex-end;
  gap:12px 22px;
}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-docs,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-docs {
  display:flex;
  flex:0 1 auto;
  min-width:0;
  width:auto;
  margin:0;
  flex-flow:row-reverse wrap;
  align-items:center;
  justify-content:flex-start;
  gap:12px 20px;
}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-card-actions,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-card-actions {
  flex:0 1 auto;
  min-width:0;
  margin:0;
  justify-content:flex-end;
}
/* Existing button alignment remains selectable. */
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta.hx-cta-left .hx-rich-bottom,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta.hx-cta-left .hx-rich-bottom {justify-content:flex-start}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta.hx-cta-left .hx-card-actions,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta.hx-cta-left .hx-card-actions {justify-content:flex-start}

/* Alternative in Design Manager: documents from the left edge, CTAs at the right. */
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-left .hx-rich-bottom,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-left .hx-rich-bottom {
  display:flex;
  flex-flow:row wrap;
  justify-content:space-between;
  align-items:center;
}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-left .hx-rich-docs,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-left .hx-rich-docs {
  flex:1 1 350px;
  flex-flow:row wrap;
  justify-content:flex-start;
  min-width:0;
}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-left .hx-card-actions,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-left .hx-card-actions {
  margin-left:auto;
  justify-content:flex-end;
}
/* Keep the pre-existing "Buttons before PDFs" option authoritative. */
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-footer-actions_first .hx-card-actions,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-footer-actions_first .hx-card-actions {order:-1}
.hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-footer-actions_first .hx-rich-docs,
.hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-footer-actions_first .hx-rich-docs {order:1}

/* Compact grid cards have their own PDF alignment; no layout spill to adjacent cards. */
.hx-archive-page.hx-design-scope .hx-view-grid .hx-card-v104.hx-docpos-near_cta .hx-rich-docs,
.hx-shortcode-catalog.hx-design-scope .hx-view-grid .hx-card-v104.hx-docpos-near_cta .hx-rich-docs {
  flex-flow:row-reverse wrap;
  justify-content:flex-start;
}
.hx-archive-page.hx-design-scope .hx-view-grid .hx-card-v104.hx-docpos-left .hx-rich-docs,
.hx-shortcode-catalog.hx-design-scope .hx-view-grid .hx-card-v104.hx-docpos-left .hx-rich-docs {
  flex-flow:row wrap;
  justify-content:flex-start;
}

/* At narrow widths let values and buttons wrap, never shrink typography. */
@media(max-width:1100px){
  .hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-specs,
  .hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-specs {
    grid-template-columns:repeat(min(2,var(--hxd-spec-cols,4)),minmax(0,1fr));
  }
}
@media(max-width:760px){
  .hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-bottom,
  .hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-bottom {
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
  }
  .hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-docs,
  .hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-rich-docs {
    flex:0 1 auto;
    width:100%;
    flex-flow:row wrap;
    justify-content:flex-start;
  }
  .hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-card-actions,
  .hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104.hx-docpos-near_cta .hx-card-actions {
    margin:0;
    justify-content:stretch;
    width:100%;
  }
}
@media(max-width:350px){
  .hx-archive-page.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-specs,
  .hx-shortcode-catalog.hx-design-scope .hx-view-list .hx-card-v104 .hx-rich-specs {
    grid-template-columns:1fr;
  }
}
