/* Home Shop by Category — exact card geometry match to Resin Raw Materials. */
/* Scope is strictly the Home category hub; hero and every other section are untouched. */

html body.page-home .home-cat-hub .featured-collections-grid,
html body.page-home .home-cat-hub .cg-category-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:clamp(1rem,1.6vw,1.25rem)!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
  padding:0!important;
  scroll-snap-type:none!important;
}

html body.page-home .home-cat-hub .craft-cat-card{
  min-width:0!important;
  width:100%!important;
  scroll-snap-align:none!important;
}

html body.page-home .home-cat-hub .craft-cat-card__shell{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  height:100%!important;
  border-radius:24px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:0 24px 48px rgba(15,23,42,.07),0 8px 24px rgba(15,23,42,.04)!important;
}

html body.page-home .home-cat-hub .craft-cat-card__media{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:4/3!important;
  border-radius:24px 24px 0 0!important;
  background:#fff!important;
  overflow:hidden!important;
}

html body.page-home .home-cat-hub .craft-cat-card__media img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  background:#fff!important;
  border:0!important;
  border-radius:0!important;
  transform:none!important;
}

html body.page-home .home-cat-hub .craft-cat-card__media img[data-image-fit="contain"]{
  object-fit:contain!important;
}

html body.page-home .home-cat-hub .craft-cat-card__body{
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
  padding:1rem 1.1rem 1.15rem!important;
  background:#fff!important;
}

html body.page-home .home-cat-hub .craft-cat-card__name{
  min-height:calc(2 * 1.3em)!important;
  margin:0 0 .45rem!important;
  font-size:1.08rem!important;
  line-height:1.3!important;
  font-weight:700!important;
  letter-spacing:-.02em!important;
  color:#1a2b48!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}

html body.page-home .home-cat-hub .craft-cat-card__count{
  margin:0 0 .75rem!important;
  font-size:.86rem!important;
  line-height:1.4!important;
  font-weight:500!important;
  color:rgba(26,43,72,.52)!important;
}

html body.page-home .home-cat-hub .craft-cat-card__cta{
  display:inline-block!important;
  margin-top:auto!important;
  font-size:.6875rem!important;
  line-height:1.2!important;
  font-weight:600!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  color:#1e8e84!important;
}

@media (min-width:900px) and (max-width:1099px){
  html body.page-home .home-cat-hub .featured-collections-grid,
  html body.page-home .home-cat-hub .cg-category-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}
@media (max-width:899px){
  html body.page-home .home-cat-hub .featured-collections-grid,
  html body.page-home .home-cat-hub .cg-category-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media (max-width:640px){
  html body.page-home .home-cat-hub .featured-collections-grid,
  html body.page-home .home-cat-hub .cg-category-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:.9rem!important;
  }
}
@media (max-width:399px){
  html body.page-home .home-cat-hub .featured-collections-grid,
  html body.page-home .home-cat-hub .cg-category-grid{
    grid-template-columns:1fr!important;
  }
}

/* Premium tile gloss + high-refresh interaction — tiles only. */
html body.page-home .home-cat-hub .craft-cat-card{
  contain:layout paint;
  transform:translateZ(0);
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  transition:transform 180ms cubic-bezier(.22,1,.36,1);
}
html body.page-home .home-cat-hub .craft-cat-card__shell{
  position:relative!important;
  isolation:isolate;
  transform:translateZ(0);
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  transition:transform 180ms cubic-bezier(.22,1,.36,1),box-shadow 180ms cubic-bezier(.22,1,.36,1);
}
html body.page-home .home-cat-hub .craft-cat-card__shell::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  border-radius:inherit;
  background:linear-gradient(118deg,transparent 18%,rgba(255,255,255,0) 34%,rgba(255,255,255,.48) 47%,rgba(255,255,255,.14) 53%,rgba(255,255,255,0) 66%,transparent 82%);
  opacity:0;
  transform:translate3d(-42%,0,0);
  transition:opacity 180ms ease,transform 420ms cubic-bezier(.22,1,.36,1);
  will-change:transform,opacity;
}
@media (hover:hover) and (pointer:fine){
  html body.page-home .home-cat-hub .craft-cat-card:hover{transform:translate3d(0,-3px,0);}
  html body.page-home .home-cat-hub .craft-cat-card:hover .craft-cat-card__shell{
    box-shadow:0 28px 52px rgba(15,23,42,.09),0 10px 28px rgba(15,23,42,.045),inset 0 1px 0 rgba(255,255,255,.95)!important;
  }
  html body.page-home .home-cat-hub .craft-cat-card:hover .craft-cat-card__shell::after{
    opacity:1;
    transform:translate3d(42%,0,0);
  }
}
html body.page-home .home-cat-hub .craft-cat-card:focus-within{transform:translate3d(0,-2px,0);}
html body.page-home .home-cat-hub .craft-cat-card:active{transform:translate3d(0,0,0) scale(.995);}
@media (prefers-reduced-motion:reduce){
  html body.page-home .home-cat-hub .craft-cat-card,
  html body.page-home .home-cat-hub .craft-cat-card__shell,
  html body.page-home .home-cat-hub .craft-cat-card__shell::after{transition:none!important;transform:none!important;}
}
@media (pointer:coarse){
  html body.page-home .home-cat-hub .craft-cat-card,
  html body.page-home .home-cat-hub .craft-cat-card__shell{transition:none!important;}
  html body.page-home .home-cat-hub .craft-cat-card__shell::after{display:none!important;}
}
