/* Homepage-only 3D pilot inspired by layered windows, depth and scroll motion.
   The existing product imagery and all page content remain unchanged. */
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-grid{
  perspective:1180px;
  perspective-origin:50% 42%;
  transform-style:preserve-3d;
}
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card{
  --tb-pilot-rx:0deg;
  --tb-pilot-ry:0deg;
  --tb-pilot-lift:0px;
  position:relative;
  transform-style:preserve-3d;
  transform-origin:center center;
  backface-visibility:hidden;
  transform:perspective(980px) rotateX(var(--tb-pilot-rx)) rotateY(var(--tb-pilot-ry)) translate3d(0,var(--tb-pilot-lift),0)!important;
  transition:transform .48s cubic-bezier(.2,.75,.25,1),opacity .68s ease,filter .32s ease;
}
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:hover,
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:focus-visible{
  --tb-pilot-lift:-5px;
}
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card.is-3d-tilting{
  --tb-pilot-lift:-8px;
  transition:transform .12s ease-out,opacity .68s ease,filter .25s ease;
  will-change:transform;
}
html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-media{
  transform-style:preserve-3d;
}
html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-media::before{
  content:"";
  position:absolute;
  z-index:0;
  inset:-6px 8px;
  border:1px solid rgba(180,145,65,.7);
  border-radius:50%;
  box-shadow:0 0 0 1px rgba(255,255,255,.55),0 0 16px rgba(180,145,65,.22);
  opacity:.34;
  pointer-events:none;
  transform:translateZ(8px) rotateX(69deg) rotateZ(-18deg) scale(1);
  transition:opacity .34s ease,transform .55s cubic-bezier(.2,.75,.25,1);
}
html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-media::after{
  content:"";
  position:absolute;
  z-index:2;
  inset:7px;
  border-radius:50%;
  pointer-events:none;
  opacity:0;
  transform:translateZ(24px);
  background:radial-gradient(circle at var(--tb-pilot-glare-x,50%) var(--tb-pilot-glare-y,50%),rgba(255,255,255,.52) 0,rgba(255,255,255,.18) 20%,transparent 58%);
  transition:opacity .26s ease;
}
html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-index,
html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-arrow{
  z-index:4;
  transform:translateZ(28px);
}
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-copy{
  transform:translateZ(14px);
  transform-style:preserve-3d;
}
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:focus-visible .category-circle-media::before,
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:focus-visible .category-circle-media::after{
  opacity:.8;
  transform:translateZ(10px) rotateX(69deg) rotateZ(-18deg) scale(1);
}
html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:focus-visible .category-circle-media::after{
  transform:translateZ(24px);
}

/* A shallow, staggered 3D rise as category cards enter the viewport. */
html.tb-3d-pilot body.has-motion[data-page="home"] #home-products .home-category-card[data-reveal]:not(.is-visible){
  opacity:0;
  transform:perspective(980px) rotateX(12deg) translate3d(0,38px,-24px)!important;
}

@media(hover:hover) and (pointer:fine){
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card.is-3d-tilting .category-circle-media::before,
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card.is-3d-tilting .category-circle-media::after,
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:hover:not(:focus-visible) .category-circle-media::before{
    opacity:.86;
  }
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card.is-3d-tilting .category-circle-media::before,
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:hover:not(:focus-visible) .category-circle-media::before{
    transform:translateZ(8px) rotateX(69deg) rotateZ(-18deg) scale(1);
  }
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card.is-3d-tilting .category-circle-media::after{
    opacity:.78;
  }
}

/* The global motion control and reduced-motion preference remain authoritative. */
html.tb-3d-pilot body.motion-paused[data-page="home"] #home-products .home-category-card,
html.tb-3d-pilot body.motion-paused[data-page="home"] #home-products .home-category-card:hover,
html.tb-3d-pilot body.motion-paused[data-page="home"] #home-products .home-category-card:focus-visible{
  transform:none!important;
  transition:none!important;
  will-change:auto;
}
html.tb-3d-pilot body.motion-paused[data-page="home"] #home-products .category-circle-media::before,
html.tb-3d-pilot body.motion-paused[data-page="home"] #home-products .category-circle-media::after{
  opacity:0!important;
}
@media(max-width:720px){
  html.tb-3d-pilot body.has-motion[data-page="home"] #home-products .home-category-card[data-reveal]:not(.is-visible){
    transform:perspective(900px) rotateX(7deg) translate3d(0,22px,-10px)!important;
  }
  html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-media::before{inset:-3px 9px}
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card.is-3d-tilting{will-change:auto}
}
@media(prefers-reduced-motion:reduce){
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card,
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:hover,
  html.tb-3d-pilot body[data-page="home"] #home-products .home-category-card:focus-visible{
    transform:none!important;
    transition:none!important;
    will-change:auto;
  }
  html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-media::before,
  html.tb-3d-pilot body[data-page="home"] #home-products .category-circle-media::after{display:none!important}
}
