/* DEC-158: keep the product grid stable before and after quote enhancement. */
body.home #main #product_families .product-panel > .cards.product-series-cards,
body.home #main #product_families .product-panel > .cards.product-series-cards:has(> .card:nth-child(2):last-child),
body.home #main #product_families .product-panel > .cards.product-series-cards:has(> .card:nth-child(3):last-child) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  max-width: none;
}

body.home #main #product_families .product-panel > .cards.product-series-cards > .quote152-card-wrap,
body.home #main #product_families .product-panel > .cards.product-series-cards > .card {
  grid-column: auto;
  min-width: 0;
  width: auto;
  max-width: none;
}

body.home #main #product_families .product-panel > .cards.product-series-cards > .product-view-all {
  grid-column: 1 / -1;
  min-height: 56px;
  padding: 16px 24px;
  border-width: 1px;
}

body.home #main #product_families .product-view-all > .card124-media {
  display: none;
}

body.home #main #product_families .product-view-all > .card124-view-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 0;
}

body.home #main #product_families .product-view-all .card124-view-copy > .ty-icon {
  order: 3;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

body.home #main #product_families .product-view-all .card124-view-copy > h3,
body.home #main #product_families .product-view-all .card124-view-copy > p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  body.home #main #product_families .product-panel > .cards.product-series-cards,
body.home #main #product_families .product-panel > .cards.product-series-cards:has(> .card:nth-child(2):last-child),
body.home #main #product_families .product-panel > .cards.product-series-cards:has(> .card:nth-child(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body.home #main #product_families .product-panel > .cards.product-series-cards,
body.home #main #product_families .product-panel > .cards.product-series-cards:has(> .card:nth-child(2):last-child),
body.home #main #product_families .product-panel > .cards.product-series-cards:has(> .card:nth-child(3):last-child) {
    grid-template-columns: minmax(0, 1fr);
  }
  body.home #main #product_families .product-panel > .cards.product-series-cards > .product-view-all {
    padding: 16px;
  }
}

/* DEC320/323: complete previews; four equal desktop categories match Products navigation. */
body.home #main #product_families .home-showcase320 > [role="tablist"] {
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;
 width:100%;max-width:1120px;margin-inline:auto;align-items:stretch;
}
body.home #main #product_families .home-showcase320 .product-tab {width:100%;min-height:56px;white-space:normal;padding:10px 16px}
body.home #main #product_families .home-showcase320 .card-image {aspect-ratio:4/3;height:auto;min-height:0;background:#fff}
body.home #main #product_families .home-showcase320 .card-image img {width:100%;height:100%;max-height:none;object-fit:contain;object-position:center}
@media(max-width:700px){
 body.home #main #product_families .home-showcase320 > [role="tablist"] {grid-template-columns:repeat(2,minmax(0,1fr))}
 body.home #main #product_families .home-showcase320 .card-image {aspect-ratio:4/3;height:auto;min-height:0}
}

/* DEC344: first six on desktop; the same ordered prefix on mobile. */
@media(min-width:701px){
 body.home #main #product_families .home-count344 > [role="tablist"] {grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (min-width: 701px) and (max-width: 820px) {
  body.home #main #product_families .home-showcase320.home-count344 .product-tab {
    padding-inline: 4px;
  }
}
@media(max-width:700px){
 body.home #main #product_families .home-count344 .home-overview344 {grid-column:1 / -1}
 body.home #main #product_families .home-count344[data-mobile-limit344="1"] .product-panel > .product-series-cards > :is(.product-series-card,.quote152-card-wrap):nth-child(n+2),
 body.home #main #product_families .home-count344[data-mobile-limit344="2"] .product-panel > .product-series-cards > :is(.product-series-card,.quote152-card-wrap):nth-child(n+3),
 body.home #main #product_families .home-count344[data-mobile-limit344="3"] .product-panel > .product-series-cards > :is(.product-series-card,.quote152-card-wrap):nth-child(n+4),
 body.home #main #product_families .home-count344[data-mobile-limit344="4"] .product-panel > .product-series-cards > :is(.product-series-card,.quote152-card-wrap):nth-child(n+5),
 body.home #main #product_families .home-count344[data-mobile-limit344="5"] .product-panel > .product-series-cards > :is(.product-series-card,.quote152-card-wrap):nth-child(n+6) {display:none}
}

body.home #main .home-trust-strip {
  background: #fff;
  padding-block: 12px;
}
body.home #main .home-trust-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
body.home #main .home-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px;
}
body.home #main .home-trust-item + .home-trust-item {
  border-inline-start: 1px solid #e7e9f5;
}
body.home #main .home-trust-item img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  flex: none;
}
body.home #main .home-trust-copy {
  min-width: 0;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
body.home #main .home-trust-copy > * {
  display: block;
}
@media (max-width: 760px) {
  body.home #main .home-trust-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.home #main .home-trust-item { justify-content: start; gap: 4px; padding-inline: 4px; }
  body.home #main .home-trust-item:nth-child(odd) { border-inline-start: 0; }
  body.home #main .home-trust-item img { width: 52px; height: 52px; }
  body.home #main .home-trust-copy { font-size: 12px; }
}

/* Homepage limits use the same ordered cards at both widths. */
@media (width > 700px) {
  body.home #main [data-home-desktop346="1"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+2),
  body.home #main [data-home-desktop346="2"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+3),
  body.home #main [data-home-desktop346="3"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+4),
  body.home #main [data-home-desktop346="4"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+5),
  body.home #main [data-home-desktop346="5"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+6),
  body.home #main [data-home-desktop346="6"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+7) { display: none; }
}
@media (width <= 700px) {
  body.home #main [data-home-mobile346="1"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+2),
  body.home #main [data-home-mobile346="2"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+3),
  body.home #main [data-home-mobile346="3"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+4),
  body.home #main [data-home-mobile346="4"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+5),
  body.home #main [data-home-mobile346="5"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+6),
  body.home #main [data-home-mobile346="6"] :is(.product-series-cards,.industry-grid182,.industry-track,.cards.gallery) > :is(.card,.quote152-card-wrap):nth-child(n+7) { display: none; }
}
