/* Barlas motion layer — transform/opacity only. Every rule degrades to the static
   barlas-refine.css look when JS, View Transitions or scroll timelines are missing. */
:root{
  --bm-spring:cubic-bezier(.22,1,.36,1);
  --bm-pop:cubic-bezier(.34,1.45,.64,1);
}
@supports (transition-timing-function:linear(0,1)){
  :root{
    --bm-spring:linear(0,0.05,0.164,0.304,0.447,0.579,0.691,0.783,0.855,0.909,0.948,0.975,0.992,1.003,1.009,1.011,1.012,1.011,1.009,1.008,1.006,1.005,1);
    --bm-pop:linear(0,0.057,0.194,0.37,0.553,0.721,0.862,0.969,1.044,1.088,1.108,1.11,1.1,1.082,1.062,1.042,1.024,1.01,1,0.993,0.989,0.988,0.988,0.99,0.992,0.994,0.996,0.998,0.999,1,1);
  }
}

/* Scatter offsets are clipped horizontally; overflow-x:clip keeps sticky headers working. */
.bt-fast #main-content,.bt-fast .bt-section,.bt-fast .bm-section{overflow-x:clip}

/* Pre-reveal state. Applied by JS only to elements that are still off-screen. */
[data-bm-pending]{opacity:0;transform:translate3d(var(--bm-tx,0px),var(--bm-ty,28px),0) rotate(var(--bm-r,0deg)) scale(var(--bm-s,1))}
.bm-w,.bm-l{display:inline-block}
.bt-fast .bt-stats strong{font-variant-numeric:tabular-nums}

/* Hero shockwave: one slow, low-opacity gold ring behind the title (not a flash). */
.bm-shock{position:absolute;z-index:-1;inset-inline-start:var(--bm-sx,30%);top:var(--bm-sy,45%);width:min(70vw,900px);aspect-ratio:1;margin:calc(min(70vw,900px)/-2) 0 0 calc(min(70vw,900px)/-2);border-radius:50%;pointer-events:none;opacity:0;background:radial-gradient(circle,transparent 52%,#d9775724 60%,transparent 70%)}
[dir=rtl] .bm-shock{margin-inline-start:calc(min(70vw,900px)/-2)}

/* Draggable product cards: horizontal drags only, vertical page scroll stays native. */
.bt-fast .bt-product-card,.bt-fast .prd-cat-card,.bt-fast .prd-card{touch-action:pan-y pinch-zoom;-webkit-user-drag:none}
.bt-fast .bt-product-card img,.bt-fast .prd-cat-card img,.bt-fast .prd-card img{-webkit-user-drag:none;user-select:none}
.bm-drag-ready{position:relative}
.bm-drag-ready.is-dragging{z-index:3;cursor:grabbing;user-select:none;box-shadow:0 24px 48px #0d172b24!important;border-color:#e2bf47!important}
.bm-drag-ready.is-dragging *{cursor:grabbing}

@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .bt-fast .bt-product-card__image img,.bt-fast .bt-mega-category__image img{transition:scale .62s var(--bm-spring)}
  .bt-fast .bt-product-card:hover .bt-product-card__image img{scale:1.045}
  .bt-fast .bt-mega-category:hover .bt-mega-category__image img{scale:1.07}
  .bt-fast .bt-arrow,.bt-fast .bt-text-link span,.bt-fast .bt-button span,.bt-fast .bt-mega-category__arrow{transition:translate .62s var(--bm-pop)}
  .bt-fast .bt-product-card:hover .bt-arrow,.bt-fast .bt-site-card:hover .bt-arrow,.bt-fast .bt-mega-category:hover .bt-mega-category__arrow,.bt-fast .bt-button:hover span{translate:3px -3px}
  [dir=rtl] .bt-fast .bt-product-card:hover .bt-arrow,[dir=rtl] .bt-fast .bt-site-card:hover .bt-arrow{translate:-3px -3px}
  .bt-fast .bt-text-link:hover span{translate:4px 0}
  [dir=rtl] .bt-fast .bt-text-link:hover span{translate:-4px 0}
  .bt-fast .bt-button,.bt-fast .nav-cta,.bt-fast .btn--primary{transition:background-color .2s,box-shadow .2s,scale .5s var(--bm-pop)}
  .bt-fast .bt-button:active,.bt-fast .nav-cta:active,.bt-fast .btn--primary:active{scale:.96;transition-duration:.08s}
}

/* Mega menu: category tiles converge from a light scatter each time the panel opens. */
@media (min-width:992px) and (prefers-reduced-motion:no-preference){
  .bt-fast .nav-menu__item--mega.is-open .bt-mega-category{animation:bm-mega-in .62s var(--bm-spring) both;animation-delay:calc(var(--bm-n,0) * 26ms)}
  .bt-fast .bt-mega-category:nth-child(2n){--bm-mx:14px}
  .bt-fast .bt-mega-category:nth-child(2n+1){--bm-mx:-14px}
  .bt-fast .bt-mega-category:nth-child(2){--bm-n:1}.bt-fast .bt-mega-category:nth-child(3){--bm-n:2}.bt-fast .bt-mega-category:nth-child(4){--bm-n:3}.bt-fast .bt-mega-category:nth-child(5){--bm-n:4}.bt-fast .bt-mega-category:nth-child(6){--bm-n:2}.bt-fast .bt-mega-category:nth-child(7){--bm-n:3}.bt-fast .bt-mega-category:nth-child(8){--bm-n:4}.bt-fast .bt-mega-category:nth-child(9){--bm-n:5}.bt-fast .bt-mega-category:nth-child(10){--bm-n:6}.bt-fast .bt-mega-category:nth-child(n+11){--bm-n:7}
  .bt-fast .nav-menu__item--mega.is-open .bt-mega-products__head{animation:bm-fade-up .45s ease-out both}
}
@keyframes bm-mega-in{from{opacity:0;translate:var(--bm-mx,0px) 16px;scale:.93}}
@keyframes bm-fade-up{from{opacity:0;translate:0 8px}}

/* Scroll-linked depth without scroll listeners (native scroll timelines only). */
@supports (animation-timeline:view()){
  @media (prefers-reduced-motion:no-preference){
    .bt-home .bt-hero__inner{animation:bm-hero-exit linear both;animation-timeline:view();animation-range:exit 0% exit 90%}
    .bt-fast .bt-quality__visual img{animation:bm-drift linear both;animation-timeline:view();animation-range:cover}
    .bt-fast .bt-quality__word{animation:bm-drift-word linear both;animation-timeline:view();animation-range:cover}
  }
}
@keyframes bm-hero-exit{to{opacity:.12;translate:0 -9vh}}
@keyframes bm-drift{from{translate:0 34px}to{translate:0 -34px}}
@keyframes bm-drift-word{from{translate:-3% 0}to{translate:3% 0}}

/* Cross-document page morph (same origin, Chromium/Safari). Unsupported → normal navigation. */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  .bt-fast .site-header{view-transition-name:bt-header}
  ::view-transition-group(root){animation-duration:.52s}
  ::view-transition-old(root){animation:bm-vt-out .34s cubic-bezier(.4,0,1,1) both}
  ::view-transition-new(root){animation:bm-vt-in .56s cubic-bezier(.16,1,.3,1) .05s both}
  html:active-view-transition-type(bm-back)::view-transition-old(root){animation-name:bm-vt-out-back}
  html:active-view-transition-type(bm-back)::view-transition-new(root){animation-name:bm-vt-in-back}
  ::view-transition-group(bt-header){animation-duration:.42s;animation-timing-function:cubic-bezier(.2,.8,.2,1)}
  ::view-transition-group(bt-morph){animation-duration:.66s;animation-timing-function:var(--bm-spring);z-index:2}
  ::view-transition-old(bt-morph),::view-transition-new(bt-morph){height:100%;object-fit:cover;overflow:clip}
  ::view-transition-old(bt-morph){animation:bm-morph-out .3s ease-in both}
  ::view-transition-new(bt-morph){animation:bm-morph-in .46s ease-out .08s both}
}
@keyframes bm-vt-out{to{opacity:0;transform:translateY(-16px) scale(.975)}}
@keyframes bm-vt-in{from{opacity:0;transform:translateY(22px) scale(1.012)}}
@keyframes bm-vt-out-back{to{opacity:0;transform:translateY(16px) scale(.975)}}
@keyframes bm-vt-in-back{from{opacity:0;transform:translateY(-22px) scale(1.012)}}
@keyframes bm-morph-out{to{opacity:0}}
@keyframes bm-morph-in{from{opacity:0}}

@media (prefers-reduced-motion:reduce){
  [data-bm-pending]{opacity:1!important;transform:none!important}
  .bm-shock{display:none}
}
@media print{
  [data-bm-pending]{opacity:1!important;transform:none!important}
  .bm-shock{display:none}
}

/* Preserve the hero accent when animation wraps individual words. */
.bt-fast .bt-hero h1 .bm-w{color:inherit}

