/* CHIPER V10: layout corrections and faster mobile catalogue browsing. */

/* Products: keep the search field in the wide second grid track even when
   WordPress inserts an empty paragraph between the label and the field. */
body.ch10-ui .ch-ui-products-search > p:empty { display:none !important; }
body.ch10-ui .ch-ui-products-search > label { grid-column:1; grid-row:1; }
body.ch10-ui .ch-ui-products-search > .ch-ui-search-row {
  grid-column:2;
  grid-row:1;
  width:100%;
  max-width:none;
}
body.ch10-ui .ch-ui-products-search .ch-ui-search-row input[type="search"] { min-width:0; }

/* Product specifications: imported inline widths can otherwise shrink the
   first cell to 34% of its grid track, causing tall letter-by-letter labels. */
body.ch10-ui .ch9-product-specifications tr {
  grid-template-columns:minmax(155px,.62fr) minmax(0,1.38fr);
  align-items:stretch;
}
body.ch10-ui .ch9-product-specifications tr > :is(td,th) {
  width:auto !important;
  min-width:0 !important;
  height:auto !important;
  align-self:stretch;
  overflow-wrap:break-word;
  word-break:normal;
}
body.ch10-ui .ch9-product-specifications tr > :is(td,th):first-child {
  padding:12px 13px;
  background:#f1f5f3;
  color:#385966;
}
body.ch10-ui .ch9-product-specifications tr > :is(td,th):last-child { padding:12px 14px; }

/* Why CHIPER: the markup uses picture elements as grid items, not img. */
body.ch10-ui .ch-ui-about-gallery-featured { grid-template-rows:repeat(2,190px); }
body.ch10-ui .ch-ui-about-gallery-featured > picture:first-child {
  grid-column:1;
  grid-row:1 / 3;
}
body.ch10-ui .ch-ui-about-gallery-featured > picture:nth-child(2) { grid-column:2; grid-row:1; }
body.ch10-ui .ch-ui-about-gallery-featured > picture:nth-child(3) { grid-column:2; grid-row:2; }
body.ch10-ui .ch-ui-about-gallery-featured > picture,
body.ch10-ui .ch-ui-about-gallery-featured > picture img { height:100%; }

/* Progressive disclosure keeps long mobile part lists scannable while all
   existing links, pagination and source text remain in the DOM. */
body.ch10-ui .ch10-list-more {
  display:none;
  width:100%;
  margin:14px 0 22px;
  padding:14px 18px;
  border:1px solid #9eb8bd;
  border-radius:2px;
  background:#fff;
  color:#075c83;
  font:inherit;
  font-size:14px;
  font-weight:750;
  text-align:left;
  cursor:pointer;
}
body.ch10-ui .ch10-list-more:hover { background:#edf3f0; }
body.ch10-ui .ch10-list-more:focus-visible { outline:3px solid #0a7198; outline-offset:3px; }

@media (max-width:900px) {
  body.ch10-ui .ch-ui-products-search > label { grid-column:1; grid-row:1; }
  body.ch10-ui .ch-ui-products-search > .ch-ui-search-row { grid-column:1; grid-row:2; }
}
@media (max-width:700px) {
  body.ch10-ui .ch9-product-specifications tr { grid-template-columns:minmax(112px,.78fr) minmax(0,1.22fr); }
  body.ch10-ui .ch9-product-specifications tr > :is(td,th):first-child,
  body.ch10-ui .ch9-product-specifications tr > :is(td,th):last-child { padding:10px 9px; }
  body.ch10-ui .ch-ui-about-gallery-featured {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:230px 135px;
  }
  body.ch10-ui .ch-ui-about-gallery-featured > picture:first-child { grid-column:1 / -1; grid-row:1; }
  body.ch10-ui .ch-ui-about-gallery-featured > picture:nth-child(2) { grid-column:1; grid-row:2; }
  body.ch10-ui .ch-ui-about-gallery-featured > picture:nth-child(3) { grid-column:2; grid-row:2; }
  body.ch10-ui .ch-ui-catalog-list ul.ch10-condensed > li:nth-child(n+13),
  body.ch10-ui .ch-pp-grid.ch10-condensed > .ch-pp-item:nth-child(n+13) { display:none !important; }
  body.ch10-ui .ch10-list-more { display:block; }
  body.ch10-ui.page-id-7 .ch-mobile-quote { display:none !important; }
}
@media (max-width:360px) {
  body.ch10-ui .ch9-product-specifications tr { grid-template-columns:1fr; }
  body.ch10-ui .ch9-product-specifications tr > :is(td,th):first-child { padding-bottom:4px; }
  body.ch10-ui .ch9-product-specifications tr > :is(td,th):last-child { padding-top:4px; }
}
