/* 希望綠豆湯 動態效果（html.hmea-motion 才生效；系統「減少動態」時不加這個 class） */
.hmea-motion{--hm-ease:cubic-bezier(.22,.61,.36,1)}

/* 1. 捲動淡入 */
.hmea-motion :is(
	#content .elementor-widget-heading,
	#content .elementor-widget-text-editor,
	#content .elementor-widget-image,
	#content .elementor-widget-button,
	#content .elementor-widget-accordion,
	ul.products li.product,
	.hmea-blog #main article.post,
	.hmea-blog-nav,
	.hmea-story p,
	.hmea-pdp .woocommerce-tabs ul.tabs,
	.hmea-pdp section.related h2,
	.hmea-pdp section.upsells h2
):not(.hm2-hero *):not(.hmea-done){transition:opacity .9s var(--hm-ease),transform .9s var(--hm-ease)}
.hmea-motion :is(
	#content .elementor-widget-heading,
	#content .elementor-widget-text-editor,
	#content .elementor-widget-image,
	#content .elementor-widget-button,
	#content .elementor-widget-accordion,
	ul.products li.product,
	.hmea-blog #main article.post,
	.hmea-blog-nav,
	.hmea-story p,
	.hmea-pdp .woocommerce-tabs ul.tabs,
	.hmea-pdp section.related h2,
	.hmea-pdp section.upsells h2
):not(.hm2-hero *):not(.hmea-in){opacity:0;transform:translate3d(0,26px,0)}
/* 滿版／絕對定位的圖片只淡入，不位移 */
.hmea-motion .hm2-img:not(.hmea-in){transform:none}
/* 詩句逐句淡入：位移小一點、慢一點 */
.hmea-motion .hmea-story p:not(.hmea-done){transition-duration:1.2s}
.hmea-motion .hmea-story p:not(.hmea-in){transform:translate3d(0,12px,0)}

/* 2. 頁首：捲動後固定、縮小、加陰影 */
.hmea-motion #masthead{position:sticky;top:0;z-index:990;transition:background-color .4s ease,box-shadow .4s ease}
.hmea-motion .admin-bar #masthead{top:32px}
.hmea-motion #masthead .elementor > .e-con,.hmea-motion #masthead .elementor > .e-con > .e-con{transition:padding .4s var(--hm-ease)}
.hmea-motion #masthead img{transition:max-height .4s var(--hm-ease)}
.hmea-scrolled #masthead{background-color:rgba(250,248,245,.97);box-shadow:0 6px 28px rgba(31,75,61,.08)}
@media (min-width:1025px){
	.hmea-motion #masthead img{max-height:89px;width:auto}
	.hmea-scrolled #masthead .elementor > .e-con,.hmea-scrolled #masthead .elementor > .e-con > .e-con{padding-top:4px!important;padding-bottom:4px!important}
	.hmea-scrolled #masthead img{max-height:60px}
}
@media (max-width:782px){
	.hmea-motion .admin-bar #masthead{top:46px}
}
@media (max-width:600px){
	.hmea-motion .admin-bar #masthead{top:0}
}

/* 3. 按鈕 */
/* 外框按鈕：由左往右填色 */
.hmea-motion :is(.hm2-more,.hm2-pill-w) .elementor-button{position:relative;overflow:hidden;z-index:0;transition:color .45s ease,border-color .45s ease!important}
.hmea-motion :is(.hm2-more,.hm2-pill-w) .elementor-button::before{content:"";position:absolute;inset:0;z-index:-1;background:#2E6B57;transform:scaleX(0);transform-origin:left center;transition:transform .55s var(--hm-ease)}
.hmea-motion .hm2-pill-w .elementor-button::before,
.hmea-motion :is(.hm2-honor,.hm3-proof) .hm2-more .elementor-button::before{background:#fff}
.hmea-motion :is(.hm2-more,.hm2-pill-w) .elementor-button:hover::before{transform:scaleX(1)}
.hmea-motion :is(.hm2-honor,.hm3-proof,#content) :is(.hm2-more,.hm2-pill-w) .elementor-button:hover{background:transparent!important}
.hmea-motion .hm2-pill-w .elementor-button:hover{color:#1F4B3D!important}
/* 「查看全部 →」箭頭往右滑 */
.hmea-motion .hm2-more .elementor-button .elementor-button-text::after{content:"→";display:inline-block;margin-left:.5em;transition:transform .4s var(--hm-ease)}
.hmea-motion .hm2-more .elementor-button:hover .elementor-button-text::after{transform:translateX(6px)}
.hmea-motion .hm4-social .hm2-more .elementor-button .elementor-button-text::after{content:"";margin:0}
/* 實心按鈕：微微浮起 */
.hmea-motion :is(.hm2-pill-g .elementor-button,.hm2-pill-wf .elementor-button,ul.products li.product .button,.single_add_to_cart_button,.hmea-buynow){transition:background-color .3s ease,color .3s ease,transform .35s var(--hm-ease),box-shadow .35s var(--hm-ease)!important}
.hmea-motion :is(.hm2-pill-g .elementor-button,.hm2-pill-wf .elementor-button,ul.products li.product .button,.single_add_to_cart_button,.hmea-buynow):hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(31,75,61,.18)}

/* 4. 圖片：緩慢放大 */
.hmea-motion #content .elementor-widget-image:not(.hm2-hero *) .elementor-widget-container{overflow:hidden;border-radius:inherit}
.hmea-motion #content .elementor-widget-image:not(.hm2-hero *) img{transition:transform 1.2s var(--hm-ease)}
.hmea-motion #content .elementor-widget-image:not(.hm2-hero *):not(.hm2-story-a *):hover img{transform:scale(1.04)}

/* 5. 首頁主視覺：文字逐行浮現、背景慢慢推近 */
.hmea-motion .hm2-hero-in > .elementor-element{animation:hmeaUp 1.2s var(--hm-ease) both}
.hmea-motion .hm2-hero-in > .elementor-element:nth-child(1){animation-delay:.15s}
.hmea-motion .hm2-hero-in > .elementor-element:nth-child(2){animation-delay:.4s}
.hmea-motion .hm2-hero-in > .elementor-element:nth-child(3){animation-delay:.7s}
.hmea-motion .hm2-hero-in > .elementor-element:nth-child(n+4){animation-delay:1s}
.hmea-kb{position:absolute;inset:0;z-index:0;background-size:cover;background-repeat:no-repeat;pointer-events:none;animation:hmeaKb 24s ease-out forwards;will-change:transform}
@keyframes hmeaUp{from{opacity:0;transform:translate3d(0,28px,0)}to{opacity:1;transform:none}}
@keyframes hmeaKb{from{transform:scale(1)}to{transform:scale(1.08)}}

/* 6. 品牌故事：背景圖輕微視差（電腦版） */
@media (min-width:1025px){
	.hmea-motion .hm2-story-a{overflow:hidden}
	.hmea-motion .hm2-story-a .hm2-img img{transform:translate3d(0,var(--hm-py,0px),0) scale(1.12);will-change:transform}
}

/* 7. 商品卡：浮起、卡片上的購物車圖示滑出 */
.hmea-motion ul.products li.product .astra-shop-thumbnail-wrap{transition:transform .5s var(--hm-ease),box-shadow .5s var(--hm-ease)}
@media (hover:hover){
	.hmea-motion ul.products li.product:hover .astra-shop-thumbnail-wrap{transform:translateY(-6px);box-shadow:0 16px 34px rgba(31,75,61,.14)}
	.hmea-motion ul.products li.product .ast-on-card-button{opacity:0;transform:translateY(10px);transition:opacity .4s ease,transform .4s var(--hm-ease)}
	.hmea-motion ul.products li.product:hover .ast-on-card-button{opacity:1;transform:none}
}

/* 8. 加入購物車：購物車圖示輕跳 */
.hmea-cart-bump{animation:hmeaBump .7s var(--hm-ease)}
@keyframes hmeaBump{0%{transform:scale(1)}30%{transform:scale(1.18) translateY(-4px)}55%{transform:scale(.95)}80%{transform:scale(1.04)}100%{transform:scale(1)}}

/* 9. 動畫結束後不留額外效果 */
.hmea-done{will-change:auto}
