/* =====================================================================
   PRODUCTS PAGE – wider page + wider cards, full product name visible
   (load LAST in products.html)
   Change 2200px to make the page wider/narrower (bigger = wider).
   ===================================================================== */
:root{--wrap:2200px}
html body .ct-page{--wrap:2200px}

/* computers: always 3 wide cards per row (instead of many narrow ones) */
@media (min-width:1024px){
  html body #ctGrid:not(.is-list){grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:26px!important}
  html body .ct-main{grid-template-columns:300px minmax(0,1fr)!important;gap:32px!important}
}

/* full product name (no "..." at the end) */
html body #ctGrid > .pc-card .pc-title,
html body #ctGrid > .pc-card .pc-box:not(.pc-desc) .pc-title{
  display:block!important;-webkit-line-clamp:unset!important;overflow:visible!important;
  font-size:17px!important;line-height:1.3!important
}
/* description: 3 lines instead of 2 */
html body #ctGrid > .pc-card .pc-desc p{-webkit-line-clamp:3!important;font-size:14px!important;line-height:1.45!important}
/* category name on the card: no "..." */
html body #ctGrid > .pc-card .pc-cat-text{white-space:normal!important;overflow:visible!important}

/* photo box: a bit lower, product photo bigger inside it */
@media (min-width:1024px){
  html body #ctGrid > .pc-card .pc-media{aspect-ratio:540/440!important}
}
html body #ctGrid > .pc-card .pc-img{width:84%!important;max-height:80%!important;top:57%!important}
/* blue band text on the card ("SAFETY & PPE PRODUCTS"): no "..." */
html body #ctGrid > .pc-card .pc-ribbon span{max-width:none!important;overflow:visible!important;text-overflow:clip!important}

/* =====================================================================
   PRODUCT DIRECTORY – sub-categories look different from main categories
   tinted panel + tree line in the category colour + count pills
   ===================================================================== */
html body .ct-subs{position:relative;margin:2px 12px 12px 22px!important;padding:8px 6px 8px 0!important;
  background:color-mix(in srgb,var(--c) 5%,#fff);border:1px solid color-mix(in srgb,var(--c) 16%,#fff);border-radius:12px}
html body .ct-subs::before{content:"";position:absolute;left:16px;top:14px;bottom:20px;width:2px;border-radius:2px;
  background:linear-gradient(180deg,var(--c),color-mix(in srgb,var(--c) 25%,#fff))}
html body .ct-subs li{position:relative}
html body .ct-subs li::before{content:"";position:absolute;left:16px;top:50%;width:12px;height:2px;background:color-mix(in srgb,var(--c) 45%,#fff)}
html body .ct-sub{position:relative;padding:8px 10px 8px 44px!important;margin:1px 0;border-radius:9px;font-size:13.5px!important;
  color:#34405f!important;transition:background .2s,color .2s,padding .2s}
html body .ct-sub::before{content:"";position:absolute;left:28px;top:50%;width:7px;height:7px;border-radius:2px;transform:translateY(-50%) rotate(45deg);
  background:#fff;border:2px solid color-mix(in srgb,var(--c) 70%,#fff);transition:background .2s}
html body .ct-sub span{min-width:26px;text-align:center;padding:1px 8px;border-radius:20px;font-size:11.5px!important;font-weight:700;opacity:1!important;
  background:#fff;color:color-mix(in srgb,var(--c) 85%,#000);border:1px solid color-mix(in srgb,var(--c) 22%,#fff)}
html body .ct-sub:hover{background:color-mix(in srgb,var(--c) 10%,#fff);color:var(--navy,#0b1b45)!important;padding-left:48px!important}
html body .ct-sub:hover::before{background:var(--c)}
html body .ct-sub.is-active{background:var(--c)!important;color:#fff!important;font-weight:700!important;box-shadow:0 6px 14px color-mix(in srgb,var(--c) 35%,transparent)}
html body .ct-sub.is-active::before{background:#fff;border-color:#fff}
html body .ct-sub.is-active span{background:rgba(255,255,255,.22);color:#fff;border-color:rgba(255,255,255,.35)}
/* sub-categories with no products yet: lighter */
html body .ct-sub.is-empty{color:#9aa4bd!important}
html body .ct-sub.is-empty span{color:#9aa4bd;background:transparent}

/* =====================================================================
   PHOTO FILLS THE PICTURE BOX on every card (like the conduit spacer)
   ===================================================================== */
html body #ctGrid > .pc-card .pc-img{width:94%!important;max-height:90%!important;height:auto!important;object-fit:contain!important;top:56%!important}
/* normal photos (JPG / stock pictures, e.g. category picture when a product has no photo):
   fill the whole box edge to edge */
html body #ctGrid > .pc-card .pc-img:is([src*=".jpg"],[src*=".jpeg"],[src*=".webp"],[src*="unsplash"]){
  left:0!important;top:0!important;transform:none!important;width:100%!important;height:100%!important;max-height:none!important;
  object-fit:cover!important;animation:none!important;filter:none!important}

/* photos uploaded in the admin panel (e.g. conduit spacers) have no empty margin:
   show them smaller so they never touch the box or the blue band */
html body #ctGrid > .pc-card .pc-img[src*="/uploads/"]{width:74%!important;max-height:66%!important;top:60%!important}

/* lighter wave background in the product photo box
   (change .55 : bigger = lighter, 0 = original) */
html body #ctGrid > .pc-card .pc-media{
  background:linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.55)),#fff url("images/pc-bg-wave.jpg") center 70% / cover no-repeat!important}
