/*
 * Jareh Finish System
 * Unified visual and motion layer for Jareh Saeadah.
 * Version: 2026.08.10
 */

:root{
  --jh-finish-brown:#5f351f;
  --jh-finish-date:#8f532e;
  --jh-finish-gold:#c99742;
  --jh-finish-cream:#fff8ed;
  --jh-finish-paper:#fffdf9;
  --jh-finish-ink:#332018;
  --jh-finish-muted:#73584b;
  --jh-finish-border:rgba(95,53,31,.12);
  --jh-finish-shadow:0 10px 28px rgba(95,53,31,.075);
  --jh-finish-shadow-hover:0 16px 36px rgba(95,53,31,.12);
  --jh-finish-radius:16px;
  --jh-finish-fast:180ms;
  --jh-finish-normal:300ms;
  --jh-finish-slow:420ms;
}

html,
body{
  max-width:100%;
  overflow-x:clip;
}

body{
  color:var(--jh-finish-ink);
}

/* One quiet appearance transition, applied by jareh-finish-system.js. */
.jh-reveal-item{
  opacity:0;
  transform:translateY(10px);
  transition:
    opacity var(--jh-finish-slow) ease,
    transform var(--jh-finish-slow) cubic-bezier(.2,.8,.2,1);
}
.jh-reveal-item.jh-is-visible{
  opacity:1;
  transform:none;
}

/* Stop decorative permanent movement. Functional WooCommerce transitions remain intact. */
body.jareh-vip-home :is(
  .main-page-wrapper::before,
  .main-page-wrapper::after,
  .e-con::before,
  .e-con::after,
  .product-label,
  .onsale,
  h1::after,
  h2::after,
  h3::after,
  .elementor-heading-title::after
),
body .wd-toolbar.wd-toolbar-label-show .wd-tools-element .wd-tools-icon,
.jx-footer .jx-graphic,
.jx-footer .jx-graphic::before,
.jx-footer .jx-graphic::after{
  animation:none !important;
  will-change:auto !important;
}

body.jareh-vip-home .main-page-wrapper::before,
body.jareh-vip-home .main-page-wrapper::after,
body.jareh-vip-home .e-con::before,
body.jareh-vip-home .e-con::after{
  content:none !important;
  display:none !important;
}

body.jareh-vip-home .wd-page-content{
  background:linear-gradient(180deg,#fffaf3 0%,#fff 38%,#fff8ed 100%) !important;
}

body.jareh-vip-home :is(.product-label,.onsale){
  box-shadow:0 6px 14px rgba(95,53,31,.14) !important;
}

/* Keep Woodmart's "new" label visible below the campaign discount badge. */
.wd-product .product-image-link > .jx-cd-badge ~ .product-labels{
  top:46px !important;
}

/* Keep the original announcement rail moving at its configured, readable speed. */
body.jareh-vip-home .wd-marquee{
  overflow:hidden !important;
}
body.jareh-vip-home .wd-marquee-content{
  animation-name:wd-MarqueeScrolling !important;
  animation-duration:var(--wd-marquee-speed,50s) !important;
  animation-timing-function:linear !important;
  animation-iteration-count:infinite !important;
  animation-play-state:running !important;
  will-change:transform;
}
body.jareh-vip-home .wd-marquee-content:nth-child(n+2){
  display:flex !important;
}

/* Correct Elementor's fixed phone width and restore the real banner aspect ratio. */
body.jareh-vip-home .elementor-element-4e4cdcb{
  --width:100% !important;
  width:100% !important;
  max-width:100% !important;
  margin-inline:auto !important;
}
body.jareh-vip-home :is(.elementor-element-8b931bb,.elementor-element-c678dfb){
  min-width:0 !important;
}
@media (max-width:768px){
  body.jareh-vip-home :is(.elementor-element-8b931bb,.elementor-element-c678dfb){
    --container-widget-width:100% !important;
    --wd-img-height:auto !important;
    width:100% !important;
    max-width:100% !important;
  }
  body.jareh-vip-home :is(.elementor-element-8b931bb,.elementor-element-c678dfb) :is(
    .promo-banner-wrapper,
    .promo-banner,
    .main-wrapp-img
  ){
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:auto !important;
  }
  body.jareh-vip-home :is(.elementor-element-8b931bb,.elementor-element-c678dfb) .banner-image{
    position:relative !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:1181 / 1331 !important;
    overflow:hidden;
  }
  body.jareh-vip-home :is(.elementor-element-8b931bb,.elementor-element-c678dfb) .banner-image img{
    position:absolute !important;
    inset:0 !important;
    display:block !important;
    width:100% !important;
    height:100% !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
    object-position:center center !important;
  }
}

/* Calm, consistent product and category cards. */
body :is(.wd-product,.category-grid-item){
  border-radius:var(--jh-finish-radius) !important;
  border-color:var(--jh-finish-border) !important;
  box-shadow:var(--jh-finish-shadow) !important;
  transition:
    transform var(--jh-finish-fast) ease,
    box-shadow var(--jh-finish-normal) ease,
    border-color var(--jh-finish-fast) ease !important;
}
@media (hover:hover){
  body :is(.wd-product,.category-grid-item):hover{
    transform:translateY(-3px) !important;
    border-color:rgba(201,151,66,.28) !important;
    box-shadow:var(--jh-finish-shadow-hover) !important;
    filter:none !important;
  }
  body :is(.wd-product,.category-grid-item):hover img{
    transform:none !important;
    filter:none !important;
  }
}

body :is(.wd-product,.category-grid-item) img{
  transition:opacity var(--jh-finish-fast) ease !important;
}

/* Prevent sparse non-carousel grids from leaving a dead half-page. */
body .products:not(.wd-carousel){
  align-items:stretch;
}
@supports(selector(:has(*))){
  @media (min-width:1025px){
    body .products:not(.wd-carousel):has(> .wd-product:nth-child(1)):not(:has(> .wd-product:nth-child(5))){
      grid-template-columns:repeat(auto-fit,minmax(210px,1fr)) !important;
    }
  }
}

/* Unified WooCommerce and loyalty surfaces. */
body.woocommerce-cart :is(.woocommerce-cart-form,.cart_totals,.cross-sells,.cart-empty),
body.woocommerce-checkout :is(.woocommerce-checkout,.woocommerce-form-login,.woocommerce-form-coupon,#order_review),
body.woocommerce-account :is(.wd-my-account-sidebar,.woocommerce-MyAccount-content,.woocommerce-form-login,.woocommerce-form-register),
body :is(.jh-points-notice,.jh-points-account-card,.wc-points-rewards-product-message){
  border:1px solid var(--jh-finish-border) !important;
  border-radius:var(--jh-finish-radius) !important;
  background:var(--jh-finish-paper) !important;
  box-shadow:var(--jh-finish-shadow) !important;
}

body.woocommerce-cart :is(.cart-content-wrapper,.woocommerce-cart-form,.cart_totals,.cross-sells)::before,
body.woocommerce-cart :is(.cart-content-wrapper,.woocommerce-cart-form,.cart_totals,.cross-sells)::after,
body.woocommerce-checkout :is(.woocommerce-checkout,#order_review,.woocommerce-checkout-review-order,.woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-additional-fields)::before,
body.woocommerce-checkout :is(.woocommerce-checkout,#order_review,.woocommerce-checkout-review-order,.woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-additional-fields)::after,
body.woocommerce-account :is(.wd-my-account-sidebar,.woocommerce-MyAccount-content,ul.wd-my-account-links>li>a,.u-columns .u-column1,.u-columns .u-column2)::before,
body.woocommerce-account :is(.wd-my-account-sidebar,.woocommerce-MyAccount-content,ul.wd-my-account-links>li>a,.u-columns .u-column1,.u-columns .u-column2)::after{
  content:none !important;
  display:none !important;
  animation:none !important;
}

body.woocommerce-cart :is(.cart-content-wrapper,.woocommerce-cart-form,.cart_totals,.cross-sells),
body.woocommerce-checkout :is(.woocommerce-checkout,#order_review,.woocommerce-checkout-review-order,.woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-additional-fields),
body.woocommerce-account :is(.wd-my-account-sidebar,.woocommerce-MyAccount-content,ul.wd-my-account-links>li>a,.u-columns .u-column1,.u-columns .u-column2){
  animation:none !important;
}

body :is(.button,button,input[type="submit"]){
  transition:
    transform var(--jh-finish-fast) ease,
    box-shadow var(--jh-finish-fast) ease,
    background-color var(--jh-finish-fast) ease !important;
}
body :is(.button,button,input[type="submit"]):active{
  transform:scale(.98);
}

/* Product page: keep gallery and purchase controls stable. */
body.single-product :is(
  .woocommerce-product-gallery img,
  .jx-fast-ic,
  .wd-buy-now-btn,
  .product-label,
  .onsale
){
  animation:none !important;
  will-change:auto !important;
}

/* Footer stays graphic but no longer moves forever. */
.jx-footer{
  background:
    linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,248,236,0) 18%),
    radial-gradient(circle at 12% 8%,rgba(201,148,69,.18),transparent 28%),
    linear-gradient(135deg,#fff8ec,#f7ecd8 58%,#efd9b9) !important;
}
.jx-footer .jx-graphic{
  transform:none !important;
  opacity:.20 !important;
}

/* One predictable stack for mobile and tablet floating controls. */
@media (max-width:1024px){
  body .wd-toolbar{
    z-index:350 !important;
  }
  body #ht-ctc-chat,
  body .ht-ctc-chat{
    right:16px !important;
    left:auto !important;
    bottom:calc(70px + env(safe-area-inset-bottom,0px)) !important;
  }
  body nav.trp-language-switcher.trp-floating-switcher,
  html[dir="rtl"] body nav.trp-language-switcher.trp-floating-switcher,
  html[dir="ltr"] body nav.trp-language-switcher.trp-floating-switcher{
    right:16px !important;
    left:auto !important;
    bottom:calc(120px + env(safe-area-inset-bottom,0px)) !important;
  }
  body .scrollToTop{
    right:auto !important;
    left:16px !important;
    bottom:calc(70px + env(safe-area-inset-bottom,0px)) !important;
  }
  body .wd-toolbar.wd-toolbar-label-show .wd-tools-element .wd-tools-icon{
    animation:none !important;
    transform:none !important;
    filter:none !important;
  }
}

/* Avoid oversized decorative spacing on shop and account pages. */
body :is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) .main-page-wrapper{
  background:linear-gradient(180deg,#fffdf9,#fff8ed) !important;
}
body :is(.woocommerce-cart,.woocommerce-checkout,.woocommerce-account) :is(h1,h2,h3){
  color:var(--jh-finish-brown);
  text-shadow:none !important;
}

@media (max-width:430px){
  body.jareh-vip-home .elementor.elementor-1070 > .e-con{
    width:100% !important;
    max-width:100% !important;
  }
  body :is(.woocommerce-cart-form,.cart_totals,#order_review,.woocommerce-MyAccount-content){
    max-width:100% !important;
    margin-inline:auto !important;
  }
}

@media (prefers-reduced-motion:reduce){
  html:focus-within{scroll-behavior:auto;}
  .jh-reveal-item,
  .jh-reveal-item.jh-is-visible,
  body *,
  body *::before,
  body *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
  .jh-reveal-item{
    opacity:1 !important;
    transform:none !important;
  }
}
