/* Foto Pamiątka – animacje. Wyłączają się, gdy system ma włączone „ogranicz ruch”. */

@keyframes fp-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fp-zoom-out { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes fp-bump { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes fp-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes fp-wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } }

/* Hero: delikatne przybliżenie zdjęcia i wjazd karty */
.fp-anim .fp-hero__bg { animation: fp-zoom-out 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.fp-anim .fp-hero__card { animation: fp-fade-up .8s .15s cubic-bezier(.2, .7, .2, 1) both; }
.fp-anim .fp-hero__card .fp-checks li { animation: fp-fade-up .6s cubic-bezier(.2, .7, .2, 1) both; }
.fp-anim .fp-hero__card .fp-checks li:nth-child(1) { animation-delay: .45s; }
.fp-anim .fp-hero__card .fp-checks li:nth-child(2) { animation-delay: .55s; }
.fp-anim .fp-hero__card .fp-checks li:nth-child(3) { animation-delay: .65s; }

/* Pojawianie się elementów przy przewijaniu */
.fp-anim :is(
	.fp-section .fp-h2, .fp-section .fp-sub, .fp-tabs-wrap, .fp-tile, .fp-step, .fp-actions, .fp-perk, .fp-review,
	.fp-b2b, .fp-about__img, .fp-about__text, .fp-faq .fp-details, .fp-nl__big, .fp-nl__title, .fp-nl__text, .fp-nl,
	.fp-product__info .fp-details, .related > h2
) {
	transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease;
	transition-delay: var(--fp-d, 0ms);
}
.fp-anim:not(.fp-anim-done) :is(
	.fp-section .fp-h2, .fp-section .fp-sub, .fp-tabs-wrap, .fp-tile, .fp-step, .fp-actions, .fp-perk, .fp-review,
	.fp-b2b, .fp-about__img, .fp-about__text, .fp-faq .fp-details, .fp-nl__big, .fp-nl__title, .fp-nl__text, .fp-nl,
	.fp-product__info .fp-details, .related > h2
):not(.is-in) {
	opacity: 0;
	transform: translateY(28px);
}
.fp-anim .fp-about__img:not(.is-in) { transform: translateX(-32px); }
.fp-anim .fp-about__text:not(.is-in) { transform: translateX(32px); }
.fp-anim .fp-nl__big:not(.is-in) { transform: scale(.6); }

/* Linia łącząca kroki „Jak zamówić?” rysuje się od lewej */
.fp-anim .fp-steps::before { transform: scaleX(0); transform-origin: left center; transition: transform 1.4s .3s cubic-bezier(.2, .7, .2, 1); }
.fp-anim .fp-steps.is-in::before, .fp-anim-done .fp-steps::before { transform: scaleX(1); }

/* Kafelki realizacji */
.fp-tile { will-change: transform; }
.fp-tile .fp-tile__img { transition: box-shadow .3s ease; }
@media (hover: hover) {
	.fp-tile.is-in:hover, .fp-anim-done .fp-tile:hover, html:not(.fp-anim) .fp-tile:hover { transform: translateY(-6px); }
	.fp-tile:hover .fp-tile__img { box-shadow: 0 14px 30px rgba(35, 32, 29, .14); }
	.fp-step:hover .fp-step__blob { animation: fp-float 1.6s ease-in-out infinite; }
	.fp-perk:hover .fp-icon { animation: fp-wiggle .6s ease; }
	.fp-review { transition: transform .3s ease, box-shadow .3s ease; }
	.fp-review:hover { box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
}

/* Zmiana kategorii: płynne pojawienie się kafelków */
.fp-tiles:not([hidden]) { animation: fp-fade .35s ease both; }

/* Przyciski */
.fp-btn, .fp-header__fb, .fp-tab, .woocommerce a.button, .woocommerce button.button {
	transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
	.fp-btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(255, 151, 171, .45); }
	.fp-btn--ghost:hover { box-shadow: 0 8px 18px rgba(255, 151, 171, .25); }
	.fp-header__fb:hover { border-color: var(--fp-pink); }
}
.fp-btn:active { transform: translateY(0); box-shadow: none; }

/* Nagłówek: cień po przewinięciu */
.fp-header { transition: box-shadow .25s ease; }
.fp-header.is-scrolled { box-shadow: 0 6px 20px rgba(35, 32, 29, .08); }

/* Licznik koszyka i cena w kreatorze */
.fp-cart-count.fp-bump, .fp-bump { animation: fp-bump .45s ease; display: inline-block; }
.fp-cart-count.fp-bump { display: flex; }

/* Kreator: płynne przejście między krokami */
.fpk-panel:not([hidden]) { animation: fp-fade-up .35s cubic-bezier(.2, .7, .2, 1) both; }
.fpk-opt, .fpk-check { transition: border-color .15s ease, background-color .15s ease, transform .15s ease, box-shadow .15s ease; }
@media (hover: hover) {
	.fpk-opt:not(.is-disabled):hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(35, 32, 29, .07); }
}
.fpk-file { animation: fp-fade-up .3s ease both; }
.fpk-progress span { transition: width .45s cubic-bezier(.2, .7, .2, 1); }

/* Akordeony */
.fp-details summary::after { transition: transform .25s ease; }
.fp-details[open] summary::after { transform: rotate(180deg); }
.fp-details[open] > :not(summary) { animation: fp-fade-up .3s ease both; }

/* Ograniczony ruch: bez animacji */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}
