/* Homepage motion layer. Loaded only by common/home.tpl. */
.hero-slide__title .home-motion-character {
  display: inline-block;
  will-change: transform;
}

.hero-slide__img,
.hero-slide__pill,
.hero-slide__btn,
.hero-slide__arrow,
.catalog_stock_wrap .button {
  will-change: transform;
}

.advantages_wrap .home-motion-benefit__icon {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #f5f7f3;
  color: #667166;
  will-change: transform;
}

.advantages_wrap .home-motion-benefit__icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.advantages_wrap .home-motion-benefit__stroke {
  stroke-dasharray: 110;
}

.advantages_wrap li.home-motion-benefit .title {
  will-change: transform;
}

.home-motion-story {
  overflow: hidden;
  isolation: isolate;
}

.home-motion-promo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  perspective: 850px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* The local banner module currently renders the same class for all three tiles.
   Keep the individual artwork bound to the stable banner IDs before JS moves it. */
.catalog_stock_wrap #banner30 {
  background-image: url('../images/catalog_hover.png');
}

.catalog_stock_wrap #banner31 {
  background-image: url('../images/stock_hover.png');
}

.catalog_stock_wrap #banner32 {
  background-image: url('../images/about_production_hover.png');
}

.home-motion-promo__media {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.home-motion-promo .green_bg,
.home-motion-promo p {
  position: relative;
  z-index: 2;
  will-change: transform;
}

.home-motion-story__media {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  transform-origin: center bottom;
  will-change: transform;
}

.home-motion-story > p,
.home-motion-story .title_two_color,
.home-motion-story .banner_text {
  position: relative;
  z-index: 2;
  will-change: transform;
}

.home-motion-story__line {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 14px;
  left: 22px;
  height: 4px;
  border-radius: 999px;
  background: #54af2b;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  will-change: transform;
}

.find_buy.home-motion-find-buy {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.find_buy .home-motion-find-buy__image {
  position: relative;
  z-index: 1;
  transform-origin: center bottom;
  will-change: transform;
}

.find_buy .home-motion-find-buy__text {
  position: relative;
  z-index: 2;
  will-change: transform;
}

/* SEO copy links stay in the reading colour until a deliberate hover state. */
.find_buy .content_wrap.main_content a,
.find_buy .content_wrap.main_content a:link,
.find_buy .content_wrap.main_content a:visited {
  color: inherit !important;
  text-decoration: underline !important;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-section .faq-panel.home-motion-faq {
  position: relative;
  margin: 0 0 10px !important;
  overflow: hidden;
  border: 1px solid #dfe7da !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.faq-section .faq-panel.home-motion-faq .faq-question {
  border: 0 !important;
  box-shadow: none !important;
  transition: background-color .25s ease;
}

.faq-section .faq-panel.home-motion-faq .faq-question .panel-title {
  flex: 1 1 auto !important;
  min-width: 0;
  width: 100% !important;
}

.faq-section .faq-panel.home-motion-faq .faq-question .panel-title a {
  box-sizing: border-box;
  display: block !important;
  padding: 18px 66px 18px 22px !important;
  width: 100% !important;
}

.faq-section .faq-panel.home-motion-faq .faq-question .panel-title a[aria-expanded="true"] {
  background: #eef8e9 !important;
  box-shadow: inset 0 -1px 0 #d9ead2;
  color: #2f5d2b !important;
}

.faq-section .faq-panel.home-motion-faq .faq-question::after {
  content: none !important;
}

.faq-section .faq-panel.home-motion-faq .faq-question .panel-title a::after {
  position: absolute;
  top: 50%;
  right: 22px;
  width: 22px;
  height: 22px;
  margin: 0;
  color: #9ca3af;
  content: '+' !important;
  font-size: 28px;
  font-weight: 300;
  line-height: 20px;
  text-align: center;
  transform: translateY(-50%);
  transition: color .25s ease, transform .25s ease;
}

.faq-section .faq-panel.home-motion-faq .faq-question .panel-title a[aria-expanded="true"]::after {
  right: 28px;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  box-sizing: border-box;
  color: #54af2b;
  content: '' !important;
  font-size: 0;
  line-height: 0;
  transform: translateY(-65%) rotate(45deg);
}

.faq-section .faq-panel.home-motion-faq:hover,
.faq-section .faq-panel.home-motion-faq:focus-within {
  border-color: #54af2b !important;
  box-shadow: 0 8px 22px rgba(54, 125, 25, .10) !important;
}

.faq-section .faq-panel.home-motion-faq:hover .faq-question,
.faq-section .faq-panel.home-motion-faq:focus-within .faq-question {
  border-bottom-color: transparent !important;
  box-shadow: none !important;
  background: #f7fbf4 !important;
}

.faq-section .faq-panel.home-motion-faq:hover .faq-question .panel-title a::after,
.faq-section .faq-panel.home-motion-faq:focus-within .faq-question .panel-title a::after {
  color: #54af2b;
  transform: translateY(-50%) scale(1.08);
}

.faq-section .faq-panel.home-motion-faq:hover .faq-question .panel-title a[aria-expanded="true"]::after,
.faq-section .faq-panel.home-motion-faq:focus-within .faq-question .panel-title a[aria-expanded="true"]::after {
  transform: translateY(-65%) rotate(45deg) scale(1.08);
}

.faq-section .faq-panel.home-motion-faq .faq-answer {
  margin-bottom: 0 !important;
  border-top: 1px solid #edf2ea !important;
  border-radius: 0 !important;
}

/* Homepage FAQ: category accordion rules otherwise clip long Bootstrap answers. */
.faq-section .panel-body.faq-answer,
.faq-section .faq-accordion .faq-answer {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-wrap: break-word;
}

/* Keep the transition from the final SEO link to FAQ compact on the homepage. */
.seo-combined-block {
  padding-bottom: 20px !important;
}

.faq-section {
  margin-top: 0 !important;
  padding: 16px 0 42px !important;
}

.faq-section .faq-card {
  padding: 0 !important;
}

.faq-section .faq-heading {
  margin: 0 0 8px !important;
}

/* Hero slider arrows: a short directional nudge only on precise hover devices. */
@media (hover: hover) and (pointer: fine) {
  /* The SEO section is assembled into three independent reading blocks on page load. */
  .seo-combined-block .home-seo-hover {
    transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
  }

  .seo-combined-block .home-seo-hover:hover {
    will-change: transform;
  }

  .seo-combined-block .home-seo-hover--left:hover {
    transform: translate3d(-8px, 0, 0);
  }

  .seo-combined-block .home-seo-hover--right:hover {
    transform: translate3d(8px, 0, 0);
  }

  .seo-combined-block .home-seo-hover--down:hover {
    transform: translate3d(0, 8px, 0);
  }

  .seo-combined-block .seo-combined-text > :is(h2, h3, p, ul, ol) {
    transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
  }

  .seo-combined-block .seo-combined-text > :is(h2, h3, p, ul, ol):hover {
    transform: translate3d(4px, -2px, 0);
    will-change: transform;
  }

  /* SEO text links: a short offset keeps the reading line stable and makes the target clear. */
  .find_buy .content_wrap.main_content a,
  .seo-combined-block .seo-combined-text a {
    display: inline-block;
    transition: transform 180ms cubic-bezier(.22, 1, .36, 1), color 180ms ease, text-shadow 180ms ease;
  }

  .find_buy .content_wrap.main_content a:hover,
  .seo-combined-block .seo-combined-text a:hover {
    color: #3e9128 !important;
    text-shadow: 0 4px 10px rgba(84, 175, 43, .18);
    transform: translate3d(3px, -1px, 0);
    will-change: transform;
  }

  /* Reuse the approved category-hover palette from the brand strip for the same URLs in SEO copy. */
  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-meshok-grusha/"]:hover,
  .seo-combined-block .seo-combined-text a[href="/katalog/kreslo-meshok-grusha/"]:hover {
    color: #a66a00 !important;
  }

  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-mjach/"]:hover,
  .seo-combined-block .seo-combined-text a[href="/katalog/kreslo-mjach/"]:hover {
    color: #1677c8 !important;
  }

  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-tron/"]:hover,
  .seo-combined-block .seo-combined-text a[href="/katalog/kreslo-tron/"]:hover {
    color: #8047aa !important;
  }

  .find_buy .content_wrap.main_content a[href="/katalog/divan/"]:hover,
  .seo-combined-block .seo-combined-text a[href="/katalog/divan/"]:hover {
    color: #2d6a4f !important;
  }

  .find_buy .content_wrap.main_content a[href="/katalog/pufiki/"]:hover,
  .seo-combined-block .seo-combined-text a[href="/katalog/pufiki/"]:hover {
    color: #c75b39 !important;
  }

  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-podushka/"]:hover,
  .seo-combined-block .seo-combined-text a[href="/katalog/kreslo-podushka/"]:hover {
    color: #087f7a !important;
  }

  /* The category links in the main SEO paragraph echo their matching motions from the brand strip. */
  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-meshok-grusha/"]:hover,
  .find_buy .content_wrap.main_content a[href="/katalog/pufiki/"]:hover,
  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-podushka/"]:hover {
    animation: bagland-brand-strip-link-lift 320ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-mjach/"]:hover,
  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-lejak/"]:hover {
    animation: bagland-brand-strip-link-tilt 300ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .find_buy .content_wrap.main_content a[href="/katalog/kreslo-tron/"]:hover,
  .find_buy .content_wrap.main_content a[href="/katalog/divan/"]:hover {
    animation: bagland-brand-strip-link-scale 280ms cubic-bezier(.22, 1, .36, 1) both;
  }

  /* FAQ cards react as a whole; the indicator moves inward without shifting the text. */
  .faq-section .faq-panel.home-motion-faq {
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s cubic-bezier(.22, 1, .36, 1);
  }

  .faq-section .faq-panel.home-motion-faq:hover {
    box-shadow: 0 10px 22px rgba(54, 125, 25, .12) !important;
    transform: translate3d(0, -2px, 0);
    will-change: transform;
  }

  .faq-section .faq-panel.home-motion-faq:hover .faq-question .panel-title a::after {
    transform: translate3d(-3px, -50%, 0) scale(1.08);
  }

  .faq-section .faq-panel.home-motion-faq:hover .faq-question .panel-title a[aria-expanded="true"]::after {
    transform: translate3d(-3px, -65%, 0) rotate(45deg) scale(1.08);
  }

  .main_slider .bx-wrapper .bx-controls-direction a.bx-prev,
  .main_slider .bx-wrapper .bx-controls-direction a.bx-next {
    transition: transform 180ms cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
  }

  .main_slider .bx-wrapper .bx-controls-direction a.bx-prev:hover {
    transform: translate3d(-4px, 0, 0) scale(1.04);
  }

  .main_slider .bx-wrapper .bx-controls-direction a.bx-next:hover {
    transform: translate3d(4px, 0, 0) scale(1.04);
  }

  /* Featured products: three ordered, non-random hover choreographies. */
  #featuredRow .popular_goods_block > div > a > div img,
  #featuredRow .popular_goods_block > div > a .popular_title {
    transition: transform 280ms cubic-bezier(.22, 1, .36, 1), color 180ms ease;
  }

  /* Price colour and background switch together; only movement is animated. */
  #featuredRow .popular_goods_block > div > a .green_cost {
    transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
  }

  #featuredRow .popular_goods_block:hover > div > a > div img,
  #featuredRow .popular_goods_block:hover > div > a .popular_title,
  #featuredRow .popular_goods_block:hover > div > a .green_cost {
    will-change: transform;
  }

  /* 1: photo lifts, title steps right, price moves left. */
  #featuredRow .popular_goods_block:nth-child(3n + 1):hover > div > a > div img {
    transform: translate3d(-3px, -6px, 0) rotate(-1deg) scale(1.04);
    transition-delay: 0ms;
  }

  #featuredRow .popular_goods_block:nth-child(3n + 1):hover > div > a .popular_title {
    color: #2d6a4f;
    transform: translate3d(5px, 0, 0);
    transition-delay: 55ms;
  }

  #featuredRow .popular_goods_block:nth-child(3n + 1):hover > div > a .green_cost {
    transform: translate3d(-5px, 0, 0) scale(1.02);
    transition-delay: 105ms;
  }

  /* 2: photo leans right, title rises, price moves right. */
  #featuredRow .popular_goods_block:nth-child(3n + 2):hover > div > a > div img {
    transform: translate3d(4px, -2px, 0) rotate(.8deg) scale(1.035);
    transition-delay: 0ms;
  }

  #featuredRow .popular_goods_block:nth-child(3n + 2):hover > div > a .popular_title {
    color: #3e6e2f;
    transform: translate3d(0, -4px, 0) scale(1.01);
    transition-delay: 55ms;
  }

  #featuredRow .popular_goods_block:nth-child(3n + 2):hover > div > a .green_cost {
    transform: translate3d(5px, 0, 0);
    transition-delay: 105ms;
  }

  /* 3: photo breathes, title moves left, price lifts to finish the sequence. */
  #featuredRow .popular_goods_block:nth-child(3n):hover > div > a > div img {
    transform: scale(1.055) rotate(-.35deg);
    transition-delay: 0ms;
  }

  #featuredRow .popular_goods_block:nth-child(3n):hover > div > a .popular_title {
    color: #2d6a4f;
    transform: translate3d(-5px, 0, 0);
    transition-delay: 55ms;
  }

  #featuredRow .popular_goods_block:nth-child(3n):hover > div > a .green_cost {
    transform: translate3d(0, -4px, 0) scale(1.02);
    transition-delay: 105ms;
  }

  /* Category cards use the same stable left → right → up rhythm. */
  .cat-grid-card {
    transition: transform 260ms cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, border-color .3s ease;
  }

  .cat-grid-card:hover {
    will-change: transform;
  }

  .cat-grid-card:nth-child(3n + 1):hover {
    transform: translate3d(-4px, 0, 0);
  }

  .cat-grid-card:nth-child(3n + 2):hover {
    transform: translate3d(4px, 0, 0);
  }

  .cat-grid-card:nth-child(3n):hover {
    transform: translate3d(0, -4px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide__title .home-motion-character,
  .hero-slide__img,
  .hero-slide__pill,
  .hero-slide__btn,
  .hero-slide__arrow,
  .catalog_stock_wrap .button,
  .advantages_wrap .home-motion-benefit__icon,
  .advantages_wrap li.home-motion-benefit .title,
  .home-motion-story__media,
  .home-motion-story__line,
  .home-motion-story > p,
  .home-motion-story .title_two_color,
  .home-motion-story .banner_text,
  .home-motion-promo,
  .home-motion-promo__media,
  .home-motion-promo .green_bg,
  .home-motion-promo p,
  .main_slider .bx-wrapper .bx-controls-direction a.bx-prev,
  .main_slider .bx-wrapper .bx-controls-direction a.bx-next,
  #featuredRow .popular_goods_block > div > a > div img,
  #featuredRow .popular_goods_block > div > a .popular_title,
  #featuredRow .popular_goods_block > div > a .green_cost,
  .cat-grid-card,
  .find_buy .content_wrap.main_content a,
  .seo-combined-block .seo-combined-text a,
  .seo-combined-block .seo-combined-text > :is(h2, h3, p, ul, ol),
  .seo-combined-block .home-seo-hover,
  .faq-section .faq-panel.home-motion-faq,
  .faq-section .faq-panel.home-motion-faq .faq-question,
  .faq-section .faq-panel.home-motion-faq .faq-question .panel-title a::after {
    will-change: auto;
  }

  #featuredRow .popular_goods_block > div > a > div img,
  #featuredRow .popular_goods_block > div > a .popular_title,
  #featuredRow .popular_goods_block > div > a .green_cost,
  .cat-grid-card,
  .find_buy .content_wrap.main_content a,
  .seo-combined-block .seo-combined-text a,
  .seo-combined-block .seo-combined-text > :is(h2, h3, p, ul, ol),
  .seo-combined-block .home-seo-hover,
  .faq-section .faq-panel.home-motion-faq {
    transition: none !important;
  }

  #featuredRow .popular_goods_block:hover > div > a > div img,
  #featuredRow .popular_goods_block:hover > div > a .popular_title,
  #featuredRow .popular_goods_block:hover > div > a .green_cost,
  .cat-grid-card:hover,
  .faq-section .faq-panel.home-motion-faq:hover,
  .find_buy .content_wrap.main_content a:hover,
  .seo-combined-block .seo-combined-text a:hover,
  .seo-combined-block .seo-combined-text > :is(h2, h3, p, ul, ol):hover,
  .seo-combined-block .home-seo-hover:hover {
    transform: none !important;
  }

  .find_buy .content_wrap.main_content a:hover {
    animation: none !important;
  }
}
