/* Motion layer (inc/motion.php + assets/js/motion.js): page transitions, scroll reveals,
   hover and press feedback. Only transform / opacity are animated, so it stays on the GPU.
   Everything is visible without JavaScript and switches off for prefers-reduced-motion. */
:root {
	--ease-out: cubic-bezier(.16, 1, .3, 1);   /* expo-out: quick start, soft landing */
	--ease-soft: cubic-bezier(.4, 0, .2, 1);
}

/* ---- Page to page: a short crossfade instead of a white flash (Chrome, Edge, Safari 18) ---- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: utsv-vt-out .18s var(--ease-soft) both; }
::view-transition-new(root) { animation: utsv-vt-in .32s var(--ease-out) both; }
@keyframes utsv-vt-out { to { opacity: 0; } }
@keyframes utsv-vt-in { from { opacity: 0; transform: translateY(8px); } }

html { scroll-behavior: smooth; }
::selection { background: rgba(92, 10, 36, .16); color: var(--color-text); }

/* ---- Scroll reveal: only once JS has marked the page ready ---- */
.motion-ready [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--reveal-i, 0) * 60ms); }
.motion-ready [data-reveal].is-in { opacity: 1; transform: none; }

/* ---- Header gains depth once the page scrolls ---- */
.site-header { transition: box-shadow .3s var(--ease-soft); }
.is-scrolled .site-header { box-shadow: 0 10px 30px -22px rgba(43, 24, 16, .55); }

/* ---- Buttons: press feedback and smooth colour changes ---- */
.btn, .single_add_to_cart_button, .utsv-buy-now, .variation-swatch, .collection-row a, .collection-chips a, .shop-edit__tabs button, .wc-block-components-button, .footer-help__btn {
	transition: background-color .25s var(--ease-soft), color .25s var(--ease-soft), border-color .25s var(--ease-soft), box-shadow .3s var(--ease-soft), transform .18s var(--ease-out) !important;
}
.btn:active, .single_add_to_cart_button:active, .utsv-buy-now:active, .variation-swatch:active, .collection-row a:active, .collection-chips a:active, .shop-edit__tabs button:active, .wc-block-components-button:active { transform: scale(.97); }
@media (hover: hover) {
	.btn--solid:hover, .single_add_to_cart_button:hover:not(:disabled) { box-shadow: 0 12px 24px -14px rgba(92, 10, 36, .7); }
}
.variation-swatch.is-selected { animation: utsv-pop .35s var(--ease-out); }
@keyframes utsv-pop { 0% { transform: scale(.92); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* ---- Product cards: slow photo zoom and a gentle lift on hover ---- */
/* The lift sits on the inner link: the card itself carries the scroll-reveal transform. */
.product-card__link { transition: transform .45s var(--ease-out); }
.product-card__media { overflow: hidden; }
.product-card__media img { transition: transform 1.1s var(--ease-out), opacity .5s var(--ease-soft); }
@media (hover: hover) {
	.product-card:hover .product-card__link { transform: translateY(-4px); }
	.product-card:hover .product-card__media img { transform: scale(1.045); }
}
.product-card__link:active { transform: scale(.985); }

/* Wishlist heart: a little pop when it is saved */
.product-card__wishlist.is-active .icon { animation: utsv-heart .45s var(--ease-out); }
@keyframes utsv-heart { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---- Links: underline slides in instead of snapping ---- */
.purchase-help a, .footer-col ul li a, .store-review figcaption a, .testimonial-card a.title { transition: color .2s var(--ease-soft); }

/* ---- Hero: the active slide drifts in slowly (Ken Burns) while slides crossfade ---- */
.hero { overflow: hidden; }
.hero__slide { transition: opacity 1s var(--ease-soft); transform-origin: 50% 0; }
.hero__slide.is-active { animation: utsv-drift 9s var(--ease-soft) both; }
@keyframes utsv-drift { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero__wrap > * { transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }

/* ---- Tabs, accordions and the filter sheet ---- */
.shop-edit__panel:not([hidden]) { animation: utsv-fade-up .45s var(--ease-out); }
.details-accordion__item.is-open .details-accordion__panel { animation: utsv-fade-up .35s var(--ease-out); }
.details-accordion__chevron .icon, .about-store__details summary .icon { transition: transform .3s var(--ease-out); }
.about-store__details[open] > :not(summary) { animation: utsv-fade-up .45s var(--ease-out); }
.filters-backdrop:not([hidden]) { animation: utsv-fade .3s var(--ease-soft); }
@keyframes utsv-fade-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes utsv-fade { from { opacity: 0; } }

/* Add to cart toast slides in */
#utsv-toast.is-visible { animation: utsv-toast .45s var(--ease-out); }
@keyframes utsv-toast { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* WhatsApp bubble: one soft attention pulse a few seconds after load */
.whatsapp-float { transition: transform .25s var(--ease-out); }
.whatsapp-float:hover { transform: scale(1.06); }
.motion-ready .whatsapp-float { animation: utsv-nudge 1.2s var(--ease-out) 4s 1 both; }
@keyframes utsv-nudge { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.12); } 55% { transform: scale(.96); } 75% { transform: scale(1.03); } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	@view-transition { navigation: none; }
	.motion-ready [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
