/* ==========================================================================
   Buyer pages only — motion refinement (loaded after /css/style.css).
   Adapts two reference motion languages to the existing Shopora buyer UI:
     · layered depth + masked text swaps + staggered sliders + slow parallax
     · depth-of-field product slides, line-by-line text, drawn spec lines,
       ticking prices, a soft brand glow behind the product, blur page fades
   No layout, colour or content changes. Driven by /js/buyer-motion.js.
   ========================================================================== */

:root {
  --bm-ease: cubic-bezier(.22, 1, .36, 1);
  --bm-swap: cubic-bezier(.65, 0, .35, 1);
}

/* --------------------------------------------------------------------------
   1. Light / dark switch — the exact glass orb from the sign-in pages
      (resources/css/shared/orb-toggle.css), keyed to the buyer's data-bs-theme
   -------------------------------------------------------------------------- */
.orb-toggle {
  --orb-w: 66px; --orb-h: 34px; --orb-d: 28px; --orb-gap: 3px;
  display: inline-flex; align-items: center;
  padding: 5px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .84rem; font-weight: 800; color: #1d1450;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .52));
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -2px 6px rgba(91, 33, 230, .1),
              0 12px 28px -14px rgba(43, 15, 134, .55), 0 2px 6px rgba(43, 15, 134, .08);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  transition: transform .2s ease, box-shadow .25s ease, background .4s ease, color .4s ease;
}
.orb-toggle:hover { transform: translateY(-1px); box-shadow: inset 0 1px 1px #fff, inset 0 -2px 6px rgba(91, 33, 230, .12), 0 16px 30px -14px rgba(43, 15, 134, .6), 0 2px 6px rgba(43, 15, 134, .1); }
.orb-toggle:active .orb { transform: translateX(var(--orb-x, 0)) scale(.9, .86); }
.orb-toggle:focus-visible { outline: 3px solid rgba(124, 58, 237, .55); outline-offset: 3px; }
.orb-track {
  position: relative; flex: none; width: var(--orb-w); height: var(--orb-h); border-radius: 999px; overflow: hidden;
  background: linear-gradient(180deg, #8fd0ff 0%, #5aa9ff 55%, #7b8cff 100%);
  box-shadow: inset 0 3px 6px rgba(0, 30, 90, .35), inset 0 -2px 3px rgba(255, 255, 255, .55), 0 1px 0 rgba(255, 255, 255, .9);
  transition: background .5s ease;
}
.orb-track::after { content: ""; position: absolute; inset: 2px 6px auto; height: 42%; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); pointer-events: none; }
.orb-sky { position: absolute; inset: 0; }
.orb-sky::before, .orb-sky::after { content: ""; position: absolute; transition: opacity .45s ease, transform .5s ease; }
.orb-sky::before { right: 7px; bottom: 6px; width: 22px; height: 8px; border-radius: 999px; background: #fff; box-shadow: -7px -3px 0 -1px #fff, 4px -4px 0 -2px #fff, -14px 2px 0 -2px rgba(255, 255, 255, .85); opacity: .95; }
.orb-sky::after { left: 9px; top: 8px; width: 2px; height: 2px; border-radius: 50%; background: #fff; box-shadow: 7px 9px 0 0 #fff, 15px 2px 0 -.2px #fff, 4px 16px 0 .3px rgba(255, 255, 255, .8), 20px 13px 0 -.2px rgba(255, 255, 255, .7), 11px -3px 0 -.3px #fff; opacity: 0; transform: translateY(6px); }
.orb {
  position: absolute; top: calc((var(--orb-h) - var(--orb-d)) / 2); left: var(--orb-gap);
  width: var(--orb-d); height: var(--orb-d); border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fffbe8 0 14%, #ffe08a 34%, #ffb627 62%, #f08a0c 86%, #c25a06 100%);
  box-shadow: inset -4px -5px 8px rgba(120, 40, 0, .3), inset 3px 3px 6px rgba(255, 255, 255, .75), 0 4px 10px rgba(220, 120, 10, .5), 0 0 16px 2px rgba(255, 196, 70, .65);
  transform: translateX(var(--orb-x, 0));
  transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), background .5s ease, box-shadow .5s ease;
}
.orb::before { content: ""; position: absolute; left: 18%; top: 12%; width: 42%; height: 30%; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%); transform: rotate(-25deg); }
.orb::after { content: ""; position: absolute; left: 22%; bottom: 7%; width: 56%; height: 18%; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); }
.orb-crater { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(70, 70, 130, .45), rgba(150, 155, 210, .25)); box-shadow: inset 1px 1px 2px rgba(40, 40, 90, .45); opacity: 0; transition: opacity .4s ease; }
.orb-crater.c1 { width: 8px; height: 8px; left: 55%; top: 22%; }
.orb-crater.c2 { width: 5px; height: 5px; left: 28%; top: 58%; }
.orb-crater.c3 { width: 4px; height: 4px; left: 62%; top: 64%; }
[data-bs-theme="dark"] .orb-toggle {
  color: #f2f3ff; border-color: rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(30, 26, 80, .78), rgba(14, 18, 60, .62));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .18), inset 0 -2px 8px rgba(0, 0, 0, .35), 0 12px 28px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(124, 58, 237, .15);
}
[data-bs-theme="dark"] .orb-track { background: linear-gradient(180deg, #0b0a2e 0%, #1b1460 60%, #3a1d8a 100%); box-shadow: inset 0 3px 7px rgba(0, 0, 0, .6), inset 0 -2px 3px rgba(160, 130, 255, .25), 0 1px 0 rgba(255, 255, 255, .12); }
[data-bs-theme="dark"] .orb-track::after { background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); }
[data-bs-theme="dark"] .orb-sky::before { opacity: 0; transform: translateX(10px); }
[data-bs-theme="dark"] .orb-sky::after { opacity: 1; transform: none; }
[data-bs-theme="dark"] .orb {
  --orb-x: calc(var(--orb-w) - var(--orb-d) - var(--orb-gap) * 2);
  background: radial-gradient(circle at 32% 28%, #ffffff 0 12%, #e6e9ff 34%, #b9c0f0 62%, #7f86c9 86%, #565c9e 100%);
  box-shadow: inset -4px -5px 8px rgba(20, 20, 70, .45), inset 3px 3px 6px rgba(255, 255, 255, .8), 0 4px 10px rgba(0, 0, 0, .45), 0 0 16px 3px rgba(167, 139, 250, .55);
}
[data-bs-theme="dark"] .orb-crater { opacity: 1; }
/* in the buyer header it sits next to the other round header buttons */
.header-actions .orb-toggle { --orb-w: 56px; --orb-h: 30px; --orb-d: 24px; padding: 4px; margin-right: .25rem; align-self: center; }
@media (max-width: 575.98px) { .header-actions .orb-toggle { --orb-w: 48px; --orb-h: 26px; --orb-d: 20px; padding: 3px; margin-right: .1rem; } }

/* theme switch without View Transitions: a soft cross-fade of colours, no flash */
html.bm-theme-fade, html.bm-theme-fade *, html.bm-theme-fade *::before, html.bm-theme-fade *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
}

/* --------------------------------------------------------------------------
   2. Page load + page changes
   -------------------------------------------------------------------------- */
/* snappy cross-fade without heavy blur */
::view-transition-old(root) { animation: bmVtOut .14s ease-out both; }
::view-transition-new(root) { animation: bmVtIn .2s var(--bm-ease) both; }
@keyframes bmVtOut { to { opacity: 0; } }
@keyframes bmVtIn { from { opacity: 0; transform: translateY(4px); } }
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) { animation: none; filter: none; }

/* staggered entrance: header, then the hero / first block, then the next ones */
.js-bm .site-header { animation: bmHeaderIn .55s var(--bm-ease) backwards; }
.js-bm .page-main { animation: none; }
.js-bm .page-main > * { animation: bmRise .65s var(--bm-ease) backwards; }
.js-bm .page-main > :nth-child(1) { animation-delay: .08s; }
.js-bm .page-main > :nth-child(2) { animation-delay: .16s; }
.js-bm .page-main > :nth-child(3) { animation-delay: .24s; }
.js-bm .page-main > :nth-child(n+4) { animation-delay: .3s; }
@keyframes bmHeaderIn { from { opacity: 0; transform: translateY(-14px); } }
@keyframes bmRise { from { opacity: 0; transform: translateY(18px); } }

/* --------------------------------------------------------------------------
   3. Hero carousel — depth-of-field swap + masked headline
   -------------------------------------------------------------------------- */
/* the outgoing slide scales back and softens; the incoming one comes forward and sharpens */
.hero-carousel.carousel-fade .carousel-item {
  transition-property: opacity, transform, filter;
  transition-duration: .7s; transition-timing-function: var(--bm-swap);
}
.hero-carousel.carousel-fade .carousel-item-next:not(.carousel-item-start),
.hero-carousel.carousel-fade .carousel-item-prev:not(.carousel-item-end) { transform: scale(1.06); filter: blur(8px); }
.hero-carousel.carousel-fade .active.carousel-item-start,
.hero-carousel.carousel-fade .active.carousel-item-end { transform: scale(.95); filter: blur(6px); }
.hero-carousel.carousel-fade .carousel-item-next.carousel-item-start,
.hero-carousel.carousel-fade .carousel-item-prev.carousel-item-end { transform: none; filter: none; }

/* headline rises inside a clipped mask, the other lines follow ~70ms apart */
.carousel-item.active .hero-content h1 { animation: bmMaskUp .75s var(--bm-ease) .1s backwards; }
.carousel-item.active .hero-content .hero-tag { animation: bmMaskUp .6s var(--bm-ease) backwards; }
.carousel-item.active .hero-content > p { animation: bmLine .55s var(--bm-ease) .24s backwards; }
.carousel-item.active .hero-content > div { animation: bmLine .55s var(--bm-ease) .31s backwards; }
@keyframes bmMaskUp {
  from { clip-path: inset(0 0 100% 0); transform: translateY(42%); opacity: .2; }
  to   { clip-path: inset(0 0 -20% 0); transform: none; opacity: 1; }
}
@keyframes bmLine { from { opacity: 0; transform: translateY(12px); } }

/* side promos float slowly with scroll (parallax set by JS in --bm-par) */
.hero-side > *, .flash::before, .flash::after { translate: 0 calc(var(--bm-par, 0) * 1px); }

/* --------------------------------------------------------------------------
   4. Product cards — lift, zoom, deeper shadow, press; rails with depth
   -------------------------------------------------------------------------- */
.product-card:hover { box-shadow: var(--shadow-lg); }
.product-card:active { transform: translateY(-2px) scale(.985); transition-duration: .12s; }
.product-card .pc-media img { transition: opacity .5s ease, transform .6s var(--bm-ease); }
.product-card:hover .pc-media img { transform: scale(1.06); }

/* horizontal rails (other than Flash Sales showcase): edge cards sit back */
.h-scroll:not(.flash-stage) > * { transition: transform .5s var(--bm-ease), opacity .5s var(--bm-ease), filter .5s var(--bm-ease); }
.h-scroll:not(.flash-stage) > .bm-edge { transform: scale(.93); opacity: .55; filter: blur(1.5px) saturate(.85); }
.h-scroll:not(.flash-stage) > .bm-edge:hover, .h-scroll:not(.flash-stage) > .bm-edge:focus-within { transform: none; opacity: 1; filter: none; }
/* after a prev / next click the cards shift one after another */
.h-scroll:not(.flash-stage).bm-shift > * { animation: bmShift .55s var(--bm-ease) both; animation-delay: calc(var(--bm-i, 0) * 45ms); }
@keyframes bmShift { from { transform: translateX(calc(var(--bm-dir, 1) * 28px)); } }

/* ---------- Flash Sale motion (adapted carousel, turntable, stagger reveal) ---------- */
.js-bm .flash:not(.is-revealed) .section-head .d-flex { opacity: 0; translate: 0 12px; }
.js-bm .flash.is-revealed .section-head .d-flex { opacity: 1; translate: none; transition: opacity .5s var(--bm-ease) .14s, translate .5s var(--bm-ease) .14s; }
.js-bm .flash:not(.is-revealed) .stock-bar .progress-bar { transform: scaleX(0); animation: none !important; }
.js-bm .flash.is-revealed .stock-bar .progress-bar { transform-origin: left; animation: fsBarGrow .65s var(--bm-ease) .25s both; }
@keyframes fsBarGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.js-bm .flash:not(.is-revealed) .flash-slot { opacity: 0; translate: 0 20px; }
.js-bm .flash.is-revealed .flash-slot.fs-reveal { animation: fsSlotReveal .46s var(--bm-ease) both; animation-delay: calc(var(--fs-i, 0) * 65ms); }
@keyframes fsSlotReveal { from { opacity: 0; translate: 0 20px; } to { translate: 0 0; } }

/* Carousel horizontal slide with staggered delay & edge clip */
.flash-slot { transition: transform .48s var(--bm-ease), opacity .4s ease, translate .46s var(--bm-ease); }
.flash-slot.fs-out {
  transition: translate .24s var(--bm-ease), opacity .2s ease;
  transition-delay: calc(var(--fs-i, 0) * 55ms);
  translate: calc(var(--fs-dir, 1) * -95%) 0;
  opacity: 0 !important;
  pointer-events: none;
}
.flash-slot.fs-in {
  animation: fsSlotIn .48s var(--bm-ease) both;
  animation-delay: calc(var(--fs-i, 0) * 65ms);
}
@keyframes fsSlotIn {
  from { opacity: 0; translate: calc(var(--fs-dir, 1) * 95%) 0; }
  to   { translate: 0 0; }
}

/* Product image turntable rotateY + scale during carousel slide */
.flash-slot.fs-in .pc-media img {
  animation: fsImgSingle .46s var(--bm-ease) backwards;
  animation-delay: calc(var(--fs-i, 0) * 65ms + 40ms);
}
.flash-slot.fs-in .pc-media[data-imgs="multi"] img {
  animation-name: fsImgTurntable;
  animation-duration: .52s;
}
@keyframes fsImgTurntable {
  0%   { opacity: .72; transform: perspective(900px) rotateY(calc(var(--fs-dir, 1) * -28deg)) scale(.9); }
  55%  { opacity: 1;   transform: perspective(900px) rotateY(calc(var(--fs-dir, 1) * 10deg)) scale(1.03); }
  100% { opacity: 1;   transform: none; }
}
@keyframes fsImgSingle {
  0%   { opacity: .82; transform: perspective(900px) rotateY(calc(var(--fs-dir, 1) * -12deg)) scale(.94); }
  100% { opacity: 1;   transform: none; }
}

/* Text swap (price, badge, seller label, countdown digits) — 150-220ms, zero shift */
.flash .countdown span.flip { animation: fsDigitTick .19s var(--bm-ease); }
@keyframes fsDigitTick { from { opacity: .28; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.flash-slot.fs-in .fs-text-swap { animation: fsTextSwap .2s var(--bm-ease) backwards; animation-delay: calc(var(--fs-i, 0) * 65ms + 90ms); }
@keyframes fsTextSwap { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Add to Cart check micro-interaction (transform & opacity only) */
.btn.atc-btn.is-added > i { animation: fsAtcPop .28s var(--bm-ease); }
@keyframes fsAtcPop {
  0%   { opacity: 0; transform: scale(.55) rotate(-14deg); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Recommended for You slider motion (#trendGrid.rec-slider) ---------- */
#trendGrid.rec-slider.bm-swap { animation: none !important; }
.rec-track {
  transition: transform .56s cubic-bezier(.22, 1, .36, 1);
}
.rec-slot {
  transition: transform .56s cubic-bezier(.22, 1, .36, 1), opacity .46s cubic-bezier(.22, 1, .36, 1);
}
#trendGrid.rec-slider.is-dragging .rec-track,
.rec-track.rec-no-trans,
.rec-slot.rec-no-trans {
  transition: none !important;
}

/* Ambient product-image backdrop crossfade */
.rec-ambient-img.is-in {
  animation: recAmbIn .56s cubic-bezier(.22, 1, .36, 1) both;
}
.rec-ambient-img.is-out {
  animation: recAmbOut .48s ease forwards;
}
@keyframes recAmbIn {
  from { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(1.16); }
  to   { transform: translate3d(-50%, -50%, 0) scale(1.25); }
}
@keyframes recAmbOut {
  to { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(1.32); }
}

/* Name & price swap: quick fade-out (150ms), then blur-to-sharp fade-in + upward translate (60ms stagger) */
.rec-slot.is-leaving .pc-body > * {
  animation: recTextOut .15s ease-out forwards;
}
@keyframes recTextOut {
  0%   { opacity: 1;   transform: translate3d(0, 0, 0); }
  100% { opacity: .25; transform: translate3d(0, -6px, 0); }
}
.rec-slot[data-pos="active"].is-entering .pc-badges,
.rec-slot[data-pos="active"].is-entering .pc-body > * {
  animation: recTextBlurIn .38s cubic-bezier(.22, 1, .36, 1) backwards;
}
.rec-slot[data-pos="active"].is-entering .pc-badges               { animation-delay: .08s; }
.rec-slot[data-pos="active"].is-entering .pc-body > :nth-child(1) { animation-delay: .12s; }
.rec-slot[data-pos="active"].is-entering .pc-body > :nth-child(2) { animation-delay: .18s; }
.rec-slot[data-pos="active"].is-entering .pc-body > :nth-child(3) { animation-delay: .24s; }
.rec-slot[data-pos="active"].is-entering .pc-body > :nth-child(4) { animation-delay: .30s; }
.rec-slot[data-pos="active"].is-entering .pc-body > :nth-child(n+5) { animation-delay: .36s; }
@keyframes recTextBlurIn {
  from { opacity: 0; filter: blur(4px); transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; filter: blur(0);   transform: translate3d(0, 0, 0); }
}

/* Large background index crossfade + parallax shift */
.rec-bg-num.is-in {
  animation: recNumIn .56s cubic-bezier(.22, 1, .36, 1) both;
}
.rec-bg-num.is-out {
  animation: recNumOut .48s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes recNumIn {
  from { opacity: 0; transform: translate3d(calc(52px + var(--rec-dir, 1) * 54px), -10px, 0); }
  to   { opacity: var(--rec-num-op, .055); transform: translate3d(calc(var(--rec-par, 0px) + 52px), -10px, 0); }
}
@keyframes recNumOut {
  from { opacity: var(--rec-num-op, .055); transform: translate3d(52px, -10px, 0); }
  to   { opacity: 0; transform: translate3d(calc(52px + var(--rec-dir, 1) * -42px), -10px, 0); }
}

/* Counter tick */
.rec-count b.is-tick {
  display: inline-block;
  animation: recCountTick .26s cubic-bezier(.22, 1, .36, 1);
}
@keyframes recCountTick {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* First scroll-into-view entrance: cards fade up in sequence once (IntersectionObserver) */
.js-bm #trendGrid.rec-slider:not(.is-revealed) .rec-slot {
  opacity: 0;
}
.js-bm #trendGrid.rec-slider.is-revealed .rec-slot.rec-enter {
  animation: recSlotEnter .54s cubic-bezier(.22, 1, .36, 1) calc(var(--rec-stagger, 0) * 70ms) backwards;
}
@keyframes recSlotEnter {
  from { opacity: 0; translate: 0 18px; }
  to   { translate: 0 0; }
}

/* Quick-view modal: desktop scale-fade, mobile slide-up bottom sheet + staggered inner content */
.modal.qv-modal.fade .modal-dialog {
  transform: scale(.93) translate3d(0, 14px, 0);
  opacity: 0;
  transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .28s ease;
}
.modal.qv-modal.show .modal-dialog {
  transform: none;
  opacity: 1;
}
@media (max-width: 767.98px) {
  .modal.qv-modal.fade .modal-dialog {
    transform: translate3d(0, 100%, 0);
    opacity: 1;
    transition: transform .44s cubic-bezier(.22, 1, .36, 1);
  }
  .modal.qv-modal.show .modal-dialog {
    transform: translate3d(0, 0, 0);
  }
}
.qv-modal.show .qv-media {
  animation: qvMediaIn .42s cubic-bezier(.22, 1, .36, 1) .04s backwards;
}
.qv-modal.show .qv-details > * {
  animation: qvLineIn .38s cubic-bezier(.22, 1, .36, 1) backwards;
}
.qv-modal.show .qv-details > :nth-child(1) { animation-delay: .06s; }
.qv-modal.show .qv-details > :nth-child(2) { animation-delay: .11s; }
.qv-modal.show .qv-details > :nth-child(3) { animation-delay: .16s; }
.qv-modal.show .qv-details > :nth-child(4) { animation-delay: .21s; }
.qv-modal.show .qv-details > :nth-child(5) { animation-delay: .26s; }
.qv-modal.show .qv-details > :nth-child(6) { animation-delay: .31s; }
.qv-modal.show .qv-details > :nth-child(n+7) { animation-delay: .36s; }
@keyframes qvMediaIn { from { opacity: 0; transform: scale(.95); } }
@keyframes qvLineIn  { from { opacity: 0; transform: translate3d(0, 10px, 0); } }

/* ---------- Promo Banner Duo scroll entrance & copied micro-interaction ---------- */
.banner-duo .promo-banner.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0) scale(.985);
  transition:
    opacity .55s var(--bm-ease),
    transform .58s var(--bm-ease),
    box-shadow .42s var(--bm-ease),
    border-color .35s ease;
}
.banner-duo .col-md-6:nth-child(2) .promo-banner.reveal {
  transition-delay: .09s, .09s, 0s, 0s;
}
.banner-duo .promo-banner.reveal.in {
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.banner-duo .promo-banner.reveal.in:hover {
  transform: translateY(-6px);
}
.banner-duo .promo-banner [data-copy].is-copied i {
  display: inline-block;
  animation: fsAtcPop .28s var(--bm-ease);
}

/* --------------------------------------------------------------------------
   5. Section text: title then subtitle, line by line
   -------------------------------------------------------------------------- */
.js-bm .section-head:not(.in) .section-title,
.js-bm .section-head:not(.in) .section-sub,
.js-bm .section-head:not(.in) .link-arrow { opacity: 0; transform: translateY(12px); }
.js-bm .section-head .section-title,
.js-bm .section-head .section-sub,
.js-bm .section-head .link-arrow { transition: opacity .55s var(--bm-ease), transform .55s var(--bm-ease); }
.js-bm .section-head.in .section-sub { transition-delay: .07s; }
.js-bm .section-head.in .link-arrow { transition-delay: .14s; }

/* --------------------------------------------------------------------------
   6. Product detail — image scales in, info lines stagger, glow behind the photo
   -------------------------------------------------------------------------- */
.pd-root > :first-child .gallery-main { animation: bmScaleIn .7s var(--bm-ease) backwards; }
.pd-root > :first-child .gallery-thumbs > * { animation: bmLine .5s var(--bm-ease) backwards; }
.pd-root > :first-child .gallery-thumbs > :nth-child(1) { animation-delay: .25s; }
.pd-root > :first-child .gallery-thumbs > :nth-child(2) { animation-delay: .32s; }
.pd-root > :first-child .gallery-thumbs > :nth-child(3) { animation-delay: .39s; }
.pd-root > :first-child .gallery-thumbs > :nth-child(n+4) { animation-delay: .46s; }
.pd-root > :nth-child(2) > * { animation: bmLine .55s var(--bm-ease) backwards; }
.pd-root > :nth-child(2) > :nth-child(1) { animation-delay: .12s; }
.pd-root > :nth-child(2) > :nth-child(2) { animation-delay: .19s; }
.pd-root > :nth-child(2) > :nth-child(3) { animation-delay: .26s; }
.pd-root > :nth-child(2) > :nth-child(4) { animation-delay: .33s; }
.pd-root > :nth-child(2) > :nth-child(5) { animation-delay: .40s; }
.pd-root > :nth-child(2) > :nth-child(6) { animation-delay: .47s; }
.pd-root > :nth-child(2) > :nth-child(n+7) { animation-delay: .54s; }
@keyframes bmScaleIn { from { opacity: 0; transform: scale(.94); } }

/* soft brand glow behind the photo; it drifts to a new spot when the image changes */
.pd-gallery-sticky { isolation: isolate; }
.pd-gallery-sticky::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  inset: -3% -7% 2% -7%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--primary-rgb), .42), transparent 74%),
              radial-gradient(closest-side at 70% 60%, rgba(193, 49, 249, .32), transparent 72%);
  filter: blur(36px);
  transform: translate(calc((var(--bm-glow, 0) - 1) * 18px), calc(var(--bm-glow, 0) * 10px)) scale(calc(1 + var(--bm-glow, 0) * .04));
  transition: transform .7s var(--bm-swap), opacity .7s ease;
}
[data-bs-theme="dark"] .pd-gallery-sticky::before { opacity: .85; }

/* gallery swap: the old photo slides out and fades, the new one slides in */
.gallery-main img { transition: transform .45s var(--bm-ease), opacity .3s ease, filter .3s ease; }
.gallery-main img.bm-out { opacity: 0; transform: translateX(calc(var(--bm-dir, 1) * -18px)) scale(.98); filter: blur(3px); }
.gallery-main img.bm-in-start { opacity: 0; transform: translateX(calc(var(--bm-dir, 1) * 18px)) scale(1.02); transition: none; }
.gallery-main.zooming img { filter: none; }

/* price and counters tick when they change */
.bm-tick { display: inline-block; animation: bmTick .42s var(--bm-ease); }
@keyframes bmTick { from { opacity: 0; transform: translateY(10px); } }

/* spec table: each line draws in from the left, then its value fades in */
.spec-table.bm-lines > tbody > tr > * { border-bottom-color: transparent; }
.spec-table.bm-lines > tbody > tr { background: linear-gradient(var(--border), var(--border)) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--bm-ease); }
.spec-table.bm-lines > tbody > tr > td { opacity: 0; transform: translateX(-6px); transition: opacity .4s ease, transform .4s var(--bm-ease); }
.spec-table.bm-lines.in > tbody > tr { background-size: 100% 1px; }
.spec-table.bm-lines.in > tbody > tr > td { opacity: 1; transform: none; }
.spec-table.bm-lines > tbody > tr:nth-child(1), .spec-table.bm-lines > tbody > tr:nth-child(1) > td { transition-delay: 0s, .2s; }
.spec-table.bm-lines > tbody > tr:nth-child(2), .spec-table.bm-lines > tbody > tr:nth-child(2) > td { transition-delay: .07s, .27s; }
.spec-table.bm-lines > tbody > tr:nth-child(3), .spec-table.bm-lines > tbody > tr:nth-child(3) > td { transition-delay: .14s, .34s; }
.spec-table.bm-lines > tbody > tr:nth-child(4), .spec-table.bm-lines > tbody > tr:nth-child(4) > td { transition-delay: .21s, .41s; }
.spec-table.bm-lines > tbody > tr:nth-child(5), .spec-table.bm-lines > tbody > tr:nth-child(5) > td { transition-delay: .28s, .48s; }
.spec-table.bm-lines > tbody > tr:nth-child(6), .spec-table.bm-lines > tbody > tr:nth-child(6) > td { transition-delay: .35s, .55s; }
.spec-table.bm-lines > tbody > tr:nth-child(n+7), .spec-table.bm-lines > tbody > tr:nth-child(n+7) > td { transition-delay: .42s, .62s; }

/* --------------------------------------------------------------------------
   7. Controls — consistent hover, focus and open / close
   -------------------------------------------------------------------------- */
a, .btn, .nav-link, .form-control, .form-select { transition-timing-function: var(--bm-ease); }
.form-control, .form-select { transition: border-color .25s ease, box-shadow .3s var(--bm-ease), background-color .25s ease; }
.btn:focus-visible, .form-control:focus, .form-select:focus { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .16); }
.link-arrow i { display: inline-block; transition: transform .3s var(--bm-ease); }
.link-arrow:hover i { transform: translateX(4px); }
/* modals rise and settle; drawers glide */
.modal.fade .modal-dialog { transform: translateY(26px) scale(.96); transition: transform .42s var(--bm-ease), opacity .3s ease; opacity: 0; }
.modal.show .modal-dialog { transform: none; opacity: 1; }
.offcanvas { transition: transform .45s var(--bm-ease), visibility .45s; }
.offcanvas-backdrop.fade { transition: opacity .35s ease; }
.nav-tabs .nav-link, .nav-pills .nav-link { transition: color .25s ease, background-color .3s var(--bm-ease), border-color .25s ease, transform .2s ease; }
.nav-pills .nav-link:active { transform: scale(.96); }
.tab-pane.fade { transition: opacity .35s ease, transform .35s var(--bm-ease); transform: translateY(8px); }
.tab-pane.fade.show { transform: none; }

/* --------------------------------------------------------------------------
   8. Less motion: no parallax, blur or stagger — simple fades only
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-name: bmFade; filter: none; transform: none; }
  @keyframes bmFade { from { opacity: 0; } }
  .js-bm .page-main > *, .js-bm .site-header, .pd-root > * > *, .pd-root .gallery-main,
  .carousel-item.active .hero-content > *, .carousel-item.active .hero-content h1 { animation: bmFade .3s ease both !important; animation-delay: 0s !important; }
  .hero-carousel.carousel-fade .carousel-item { transform: none !important; filter: none !important; }
  .hero-side > *, .flash::before, .flash::after { translate: none; }
  .h-scroll:not(.flash-stage) > .bm-edge { transform: none; filter: none; opacity: 1; }
  .h-scroll:not(.flash-stage).bm-shift > * { animation: none; }
  .flash .section-head .d-flex, .flash-slot, .flash-slot.fs-reveal, .flash-slot.fs-in, .flash-slot.fs-out,
  .flash-slot.fs-in .pc-media img, .flash-slot.fs-in .fs-text-swap, .flash .countdown span.flip,
  .flash.is-revealed .stock-bar .progress-bar, .btn.atc-btn.is-added > i {
    animation: bmFade .2s ease both !important;
    animation-delay: 0s !important;
    transition: opacity .2s ease !important;
    transform: none !important;
    translate: none !important;
  }
  .flash:not(.is-revealed) .stock-bar .progress-bar { transform: none !important; opacity: 0; }
  .flash.is-revealed .stock-bar .progress-bar { opacity: 1; animation: bmFade .2s ease both !important; }
  .gallery-main img.bm-out, .gallery-main img.bm-in-start { transform: none; filter: none; }
  .pd-gallery-sticky::before { transition: none; }
  .spec-table.bm-lines > tbody > tr, .spec-table.bm-lines > tbody > tr > td { transition-delay: 0s !important; }
  /* Recommended slider: 150ms crossfades only, no drag follower, no parallax, no blur */
  .rec-cursor { display: none !important; }
  .rec-track, .rec-slot {
    transition: opacity .15s ease !important;
  }
  .rec-ambient-img {
    filter: none !important;
    opacity: .06;
    animation: bmFade .15s ease both !important;
    transition: opacity .15s ease !important;
  }
  .rec-slot[data-pos="active"].is-entering,
  .rec-slot.is-leaving .pc-body > *,
  .rec-slot[data-pos="active"].is-entering .pc-badges,
  .rec-slot[data-pos="active"].is-entering .pc-body > *,
  .rec-bg-num.is-in,
  .rec-bg-num.is-out,
  .rec-count b.is-tick,
  .js-bm #trendGrid.rec-slider.is-revealed .rec-slot.rec-enter,
  .qv-modal.show .qv-media,
  .qv-modal.show .qv-details > * {
    animation: bmFade .15s ease both !important;
    animation-delay: 0s !important;
    filter: none !important;
    translate: none !important;
  }
  .modal.qv-modal.fade .modal-dialog {
    transform: none !important;
    transition: opacity .15s ease !important;
  }
  .btn.is-added .atc-check-path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
  /* Recently viewed: no sheen, zoom, lift, or sibling dim on reduced motion */
  #recentGrid:has(.product-card:hover) .product-card:not(:hover) { opacity: 1; transform: none; }
  #recentGrid .product-card:hover,
  #recentGrid .product-card:active,
  #recentGrid .product-card:hover .pc-media img,
  #recentGrid .product-card:hover .pc-wish { transform: none !important; }
  #recentGrid .product-card .pc-media::before { display: none; }
  #recentGrid .product-card::after { transition: opacity .15s ease; transform: scaleX(1); }
  /* Promo banner duo: no sheen, hover lift, image rotation, or stagger on reduced motion */
  .banner-duo .promo-banner::before,
  .banner-duo .promo-banner::after { display: none; }
  .banner-duo .promo-banner.reveal,
  .banner-duo .promo-banner.reveal.in,
  .banner-duo .promo-banner:hover,
  .banner-duo .promo-banner img,
  .banner-duo .promo-banner:hover img,
  .banner-duo .promo-banner.b2 a.btn:hover .bi-arrow-right {
    transform: none !important;
    transition: opacity .2s ease !important;
    transition-delay: 0s !important;
  }
}
