/* ==========================================================================
   T Blings – animations
   1) Scroll reveals (added by animations.js; hidden only when JS is running)
   2) Micro-animations (hearts, bow, sparkles, gift box, buttons)
   Everything is switched off for visitors who prefer reduced motion.
   ========================================================================== */
:root {
	--tb-ease: cubic-bezier(.22, .9, .32, 1);
	--tb-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
	--tb-rev-dist: 28px;
	--tb-rev-time: .75s;
}
@media (max-width: 767px) {
	:root { --tb-rev-dist: 18px; --tb-rev-time: .6s; }
}

/* ---------- 1. Scroll reveals ---------- */
.tb-anim [data-tb-rev] {
	opacity: 0;
	transition: opacity var(--tb-rev-time) var(--tb-ease), transform var(--tb-rev-time) var(--tb-ease);
	transition-delay: var(--tb-d, 0ms);
	will-change: opacity, transform;
}
.tb-anim [data-tb-rev="up"]    { transform: translate3d(0, var(--tb-rev-dist), 0); }
.tb-anim [data-tb-rev="down"]  { transform: translate3d(0, calc(var(--tb-rev-dist) * -1), 0); }
.tb-anim [data-tb-rev="left"]  { transform: translate3d(calc(var(--tb-rev-dist) * 1.4), 0, 0); }
.tb-anim [data-tb-rev="right"] { transform: translate3d(calc(var(--tb-rev-dist) * -1.4), 0, 0); }
.tb-anim [data-tb-rev="zoom"]  { transform: translate3d(0, 14px, 0) scale(.92); transition-timing-function: var(--tb-ease), var(--tb-ease-pop); }
.tb-anim [data-tb-rev="tilt"]  { transform: translate3d(-30px, 10px, 0) rotate(-9deg) scale(.94); transition-timing-function: var(--tb-ease), var(--tb-ease-pop); }
.tb-anim [data-tb-rev="fade"]  { transform: none; }
.tb-anim [data-tb-rev].is-in { opacity: 1; transform: none; }
.tb-anim .tb-gift__media[data-tb-rev].is-in img,
.tb-anim .tb-gift__media[data-tb-rev].is-in svg { transition: transform .9s var(--tb-ease-pop); }
/* Done animating: drop will-change so hover effects stay crisp */
.tb-anim [data-tb-rev].is-done { will-change: auto; transition-delay: 0ms; }

/* ---------- 2. Hero slider: soft Ken Burns zoom on the active slide ---------- */
.tb-slider__slide img { transform-origin: 50% 50%; }
.tb-slider__slide.is-active img { animation: tbHeroIn .9s ease-out both; }
@keyframes tbHeroIn { from { opacity: .55; } to { opacity: 1; } }
.tb-slider__dots button.is-active { animation: tbDot .5s var(--tb-ease-pop); }
@keyframes tbDot { from { width: 9px; } }

/* ---------- Hearts beat ---------- */
.tb-heading__heart, .tb-page-hero__title .tb-doodle-heart, .tb-features__heart, .tb-footer__script .tb-doodle-heart {
	animation: tbBeat 2.6s ease-in-out infinite; transform-origin: 50% 60%;
}
.tb-features__heart { animation-name: tbBeatRot; }
@keyframes tbBeat { 0%, 60%, 100% { transform: scale(1); } 10% { transform: scale(1.22); } 20% { transform: scale(.95); } 30% { transform: scale(1.12); } }
@keyframes tbBeatRot { 0%, 60%, 100% { transform: translateY(-50%) rotate(12deg) scale(1); } 15% { transform: translateY(-50%) rotate(12deg) scale(1.25); } 30% { transform: translateY(-50%) rotate(12deg) scale(1.08); } }

/* ---------- Heading doodles draw in ---------- */
.tb-anim .tb-heading[data-tb-rev] .tb-heading__deco { opacity: 0; transform: translateX(-12px); transition: opacity .6s ease .25s, transform .6s var(--tb-ease) .25s; }
.tb-anim .tb-heading[data-tb-rev] .tb-heading__deco.tb-flip { transform: scaleX(-1) translateX(-12px); }
.tb-anim .tb-heading[data-tb-rev].is-in .tb-heading__deco { opacity: 1; transform: none; }
.tb-anim .tb-heading[data-tb-rev].is-in .tb-heading__deco.tb-flip { transform: scaleX(-1); }

/* ---------- Floating badges / doodles ---------- */
.tb-arrivals__badge { animation: tbFloatRot 4.5s ease-in-out infinite; }
@keyframes tbFloatRot { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-6px); } }
.tb-offer__badge { animation: tbFloatRot2 4s ease-in-out infinite; }
@keyframes tbFloatRot2 { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-5deg) translateY(-5px); } }
.tb-arrivals__badge .tb-inline-heart, .tb-offer__badge .tb-inline-heart, .tb-gift__title .tb-inline-heart, .tb-news__title .tb-inline-heart, .tb-faq__title .tb-inline-heart {
	animation: tbBeat 2.4s ease-in-out infinite; transform-origin: 50% 60%;
}
.tb-gift__deco .d6 { animation: tbSwing 3.2s ease-in-out infinite; transform-origin: 50% 40%; }
@keyframes tbSwing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.tb-gift__deco .d1, .tb-gift__deco .d2, .tb-gift__deco .d5 { animation: tbFloat 5s ease-in-out infinite; }
.tb-gift__deco .d2 { animation-delay: -1.6s; }
.tb-gift__deco .d5 { animation-delay: -3s; }
@keyframes tbFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.tb-gift__deco .d4 { animation: tbWiggle 3.6s ease-in-out infinite; }
@keyframes tbWiggle { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -10deg; } 90% { rotate: 8deg; } 95% { rotate: -4deg; } }
.tb-gift__deco .d3, .tb-offer__deco .s1, .tb-offer__deco .s2, .tb-offer__deco .s3, .tb-faq__star, .tb-news__deco .n2, .tb-news__deco .n3 {
	animation: tbTwinkle 2.2s ease-in-out infinite;
}
.tb-offer__deco .s2 { animation-delay: -.7s; }
.tb-offer__deco .s3 { animation-delay: -1.4s; }
.tb-faq__star.b { animation-delay: -1s; }
.tb-news__deco .n3 { animation-delay: -1.1s; }
@keyframes tbTwinkle { 0%, 100% { opacity: .35; scale: .7; } 50% { opacity: 1; scale: 1.15; } }
.tb-offer__media { animation: tbBob 3.4s ease-in-out infinite; }
@keyframes tbBob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -8px; rotate: 2deg; } }
.tb-faq__bag .tb-doodle--bag { animation: tbBob 4s ease-in-out infinite; }
.tb-faq__chat { animation: tbWiggle 4.5s ease-in-out infinite; }

/* Offer banner: shine sweep */
.tb-offer__deco::after {
	content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; border-radius: inherit;
	background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .22) 50%, transparent 100%);
	animation: tbSweep 5.5s ease-in-out infinite;
}
.tb-offer__deco { overflow: hidden; }
@keyframes tbSweep { 0%, 55% { left: -40%; } 100% { left: 130%; } }

/* ---------- Buttons: shine on hover ---------- */
.tb-btn, .woocommerce a.button.alt, .woocommerce button.button.alt, .single_add_to_cart_button { position: relative; overflow: hidden; }
.tb-btn::after, .single_add_to_cart_button::after, .woocommerce a.checkout-button::after {
	content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
	transform: skewX(-18deg); transition: left .7s ease;
}
.tb-btn:hover::after, .single_add_to_cart_button:hover::after, .woocommerce a.checkout-button:hover::after { left: 130%; }
.tb-btn .tb-icon--arrow { transition: transform .3s var(--tb-ease-pop); }
.tb-btn:hover .tb-icon--arrow { transform: translateX(4px); }

/* ---------- Cards ---------- */
.tb-cat__arrow .tb-icon { transition: transform .3s var(--tb-ease-pop); }
.tb-cat:hover .tb-cat__arrow .tb-icon { transform: translateX(5px); }
.tb-card__cart { transition: transform .25s var(--tb-ease-pop), background .2s; }
.tb-card:hover .tb-card__cart { transform: scale(1.08); }
.tb-card__cart:active { transform: scale(.92); }
.tb-card__cart.loading .tb-icon { animation: tbSpin .8s linear infinite; }
@keyframes tbSpin { to { transform: rotate(360deg); } }
.tb-card__cart.added .tb-icon { animation: tbPop .45s var(--tb-ease-pop); }
@keyframes tbPop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.tb-wish:active { transform: scale(.85); }
.tb-feature__icon { transition: transform .35s var(--tb-ease-pop); }
.tb-feature:hover .tb-feature__icon { transform: translateY(-4px) rotate(-6deg); }
.tb-anim .tb-feature[data-tb-rev].is-in .tb-feature__icon { animation: tbIconIn .7s var(--tb-ease-pop) both; animation-delay: calc(var(--tb-d, 0ms) + 150ms); }
@keyframes tbIconIn { 0% { transform: scale(.3) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.tb-review { transition: transform .3s var(--tb-ease), box-shadow .3s; }
.tb-review:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(155, 27, 74, .14); }
.tb-insta__tile img { transition: transform .6s var(--tb-ease); }
.tb-account-card__icon { transition: transform .3s var(--tb-ease-pop); }
.tb-account-card:hover .tb-account-card__icon { transform: scale(1.12) rotate(-6deg); }
.tb-pill { transition: background .2s, color .2s, transform .25s var(--tb-ease-pop); }
.tb-pill:hover { transform: translateY(-2px); }

/* ---------- Header ---------- */
.tb-logo__text { transition: transform .35s var(--tb-ease); }
.tb-logo__text:hover { transform: scale(1.04); }
.tb-iconbtn .tb-icon { transition: transform .25s var(--tb-ease-pop); }
.tb-iconbtn:hover .tb-icon { transform: scale(1.12); }
.tb-count.is-bump { animation: tbBump .6s var(--tb-ease-pop); }
@keyframes tbBump { 0% { transform: scale(1); } 35% { transform: scale(1.6); } 100% { transform: scale(1); } }
.tb-menu .sub-menu li { opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.tb-menu li:hover > .sub-menu li, .tb-menu li:focus-within > .sub-menu li { opacity: 1; transform: none; }
.tb-menu li:hover > .sub-menu li:nth-child(2) { transition-delay: .03s; }
.tb-menu li:hover > .sub-menu li:nth-child(3) { transition-delay: .06s; }
.tb-menu li:hover > .sub-menu li:nth-child(4) { transition-delay: .09s; }
.tb-menu li:hover > .sub-menu li:nth-child(5) { transition-delay: .12s; }
.tb-menu li:hover > .sub-menu li:nth-child(n+6) { transition-delay: .15s; }

/* Mobile menu: links slide in */
.tb-drawer--menu .tb-mmenu > li { opacity: 0; transform: translateX(-16px); transition: opacity .35s ease, transform .35s var(--tb-ease); }
.tb-drawer--menu.is-open .tb-mmenu > li { opacity: 1; transform: none; }
.tb-drawer--menu.is-open .tb-mmenu > li:nth-child(1) { transition-delay: .08s; }
.tb-drawer--menu.is-open .tb-mmenu > li:nth-child(2) { transition-delay: .12s; }
.tb-drawer--menu.is-open .tb-mmenu > li:nth-child(3) { transition-delay: .16s; }
.tb-drawer--menu.is-open .tb-mmenu > li:nth-child(4) { transition-delay: .2s; }
.tb-drawer--menu.is-open .tb-mmenu > li:nth-child(5) { transition-delay: .24s; }
.tb-drawer--menu.is-open .tb-mmenu > li:nth-child(n+6) { transition-delay: .28s; }

/* Cart drawer items */
.tb-drawer--cart.is-open .woocommerce-mini-cart-item { animation: tbSlideIn .45s var(--tb-ease) both; }
.tb-drawer--cart.is-open .woocommerce-mini-cart-item:nth-child(2) { animation-delay: .06s; }
.tb-drawer--cart.is-open .woocommerce-mini-cart-item:nth-child(3) { animation-delay: .12s; }
.tb-drawer--cart.is-open .woocommerce-mini-cart-item:nth-child(n+4) { animation-delay: .18s; }
@keyframes tbSlideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.tb-freeship__bar span { transition: width .9s var(--tb-ease); }

/* ---------- FAQ accordion (height animated by JS) ---------- */
.tb-faq__a { overflow: hidden; }
.tb-faq__item { transition: border-color .25s, box-shadow .25s; }
.tb-faq__item[open] { border-color: var(--tb-accent); box-shadow: 0 6px 18px rgba(226, 69, 127, .12); }
.tb-faq__plus { transition: transform .3s var(--tb-ease-pop); }

/* ---------- Product page ---------- */
.tb-urgency { animation: tbNudge 3.5s ease-in-out infinite; }
@keyframes tbNudge { 0%, 88%, 100% { transform: none; } 92% { transform: translateX(3px); } 96% { transform: translateX(-3px); } }
.tb-buy-now { animation: tbGlow 2.8s ease-in-out infinite; }
@keyframes tbGlow { 0%, 100% { box-shadow: 0 6px 16px rgba(74, 15, 38, .25); } 50% { box-shadow: 0 6px 26px rgba(226, 69, 127, .55); } }
.tb-btn--wa .tb-icon { animation: tbRing 3s ease-in-out infinite; }
@keyframes tbRing { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-14deg); } 88% { transform: rotate(12deg); } 92% { transform: rotate(-8deg); } }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { transition: color .2s, border-color .3s; }
.woocommerce-Tabs-panel { animation: tbFadeUp .45s var(--tb-ease) both; }
@keyframes tbFadeUp { from { opacity: .35; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tb-sticky-atc.is-visible .tb-btn { animation: tbPop .5s var(--tb-ease-pop); }

/* Notices slide down */
.woocommerce-message, .woocommerce-info, .woocommerce-error { animation: tbFadeDown .5s var(--tb-ease) both; }
@keyframes tbFadeDown { from { opacity: .35; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* Toast */
.tb-toast { transition: opacity .3s, transform .4s var(--tb-ease-pop); }

/* ---------- Reduced motion: soft fades only (bypass for previews with ?tb_motion=full) ---------- */
.tb-anim-reduced [data-tb-rev] { transform: none !important; transition-property: opacity !important; transition-duration: .6s !important; }
@media (prefers-reduced-motion: reduce) {
	html:not(.tb-motion-full) :is(.tb-heading__heart, .tb-page-hero__title .tb-doodle-heart, .tb-features__heart, .tb-footer__script .tb-doodle-heart,
	.tb-arrivals__badge, .tb-offer__badge, .tb-inline-heart, .tb-gift__deco .tb-doodle, .tb-offer__deco .tb-doodle, .tb-offer__deco,
	.tb-offer__media, .tb-faq__bag .tb-doodle--bag, .tb-faq__chat, .tb-faq__star, .tb-news__deco .tb-doodle,
	.tb-urgency, .tb-buy-now, .tb-btn--wa .tb-icon, .tb-slider__slide.is-active img) { animation: none !important; }
	html:not(.tb-motion-full) .tb-offer__deco::after { animation: none !important; display: none; }
	html:not(.tb-motion-full) :is(.tb-btn, .single_add_to_cart_button, .woocommerce a.checkout-button)::after { display: none; }
}
