/* ==========================================================================
   Floressa — scroll animations & hover effects
   --------------------------------------------------------------------------
   Scroll reveal:  active only when <html> has .fl-anim (added in <head> when
                   "Scroll Animations" is on and the visitor doesn't prefer
                   reduced motion). main.js adds .is-inview as items scroll in.
   Hover effects:  active only when <body> has .fl-hoverfx ("Hover Effects"
                   option) and only on devices with a real mouse pointer.
   Both can be switched off under Customize → Floressa Theme → Animations.
   ========================================================================== */

:root {
	--fl-ease: cubic-bezier(.22, .61, .36, 1);
	--fl-ease-out: cubic-bezier(.16, 1, .3, 1);
	--fl-spring: cubic-bezier(.34, 1.56, .64, 1);
	--fl-rv-dur: .85s;
	--fl-rv-dist: 28px;
}

/* ---------- Keyframes ---------- */
@keyframes fl-rv-up    { from { opacity: 0; transform: translate3d(0, var(--fl-rv-dist), 0); } }
@keyframes fl-rv-fade  { from { opacity: 0; } }
@keyframes fl-rv-left  { from { opacity: 0; transform: translate3d(-40px, 0, 0); } }
@keyframes fl-rv-right { from { opacity: 0; transform: translate3d(40px, 0, 0); } }
@keyframes fl-rv-zoom  { from { opacity: 0; transform: scale(.86); } }
@keyframes fl-rv-soft  { from { opacity: 0; transform: scale(.965); } }
@keyframes fl-kenburns { from { transform: scale(1.14); } }
@keyframes fl-underline-swap {
	0%     { background-size: 100% 1.5px; background-position: 100% 100%; }
	45%    { background-size: 0 1.5px;    background-position: 100% 100%; }
	45.1%  { background-size: 0 1.5px;    background-position: 0 100%; }
	100%   { background-size: 100% 1.5px; background-position: 0 100%; }
}

/* ==========================================================================
   Scroll reveal
   Single elements and the children of "stagger" groups start hidden, then
   play their entrance once main.js marks them .is-inview. `backwards` fill
   keeps the hidden frame during the stagger delay but releases transform
   afterwards, so hover transforms keep working.
   ========================================================================== */

/* Hidden until revealed */
html.fl-anim :is(
	.fl-section-head, .fl-page-head, .fl-single__head, .fl-single__media,
	.fl-newsletter__row, .fl-video, .fl-banner--wide, .fl-post-nav,
	.woocommerce-products-header, .fl-404, .fl-empty-state
):not(.is-inview),
html.fl-anim :is(
	.fl-hero, .fl-features__grid, .fl-product-grid:not(.fl-showcase__cards), ul.products,
	.fl-grid-2, .fl-grid-3, .fl-showcase__grid, .fl-cats__rail, .fl-post-grid, .fl-footer__grid
) > :not(.is-inview) {
	opacity: 0;
}

/* Default entrance: fade up */
html.fl-anim :is(
	.fl-section-head, .fl-page-head, .fl-single__head, .fl-single__media,
	.fl-newsletter__row, .fl-video, .fl-banner--wide, .fl-post-nav,
	.woocommerce-products-header, .fl-404, .fl-empty-state
).is-inview,
html.fl-anim :is(
	.fl-hero, .fl-features__grid, .fl-product-grid:not(.fl-showcase__cards), ul.products,
	.fl-grid-2, .fl-grid-3, .fl-showcase__grid, .fl-cats__rail, .fl-post-grid, .fl-footer__grid
) > .is-inview {
	animation: fl-rv-up var(--fl-rv-dur) var(--fl-ease-out) var(--fl-d, 0ms) backwards;
}

/* Variants */
html.fl-anim .fl-hero > .is-inview { animation-name: fl-rv-fade; animation-duration: 1.1s; }
html.fl-anim .fl-hero > .is-inview .fl-hero__img { animation: fl-kenburns 2.2s var(--fl-ease-out) var(--fl-d, 0ms) backwards; }
html.fl-anim .fl-hero > .is-inview .fl-hero__body { animation: fl-rv-up .9s var(--fl-ease-out) calc(var(--fl-d, 0ms) + 250ms) backwards; }

html.fl-anim .fl-grid-2 > .is-inview:nth-child(odd)  { animation-name: fl-rv-left; }
html.fl-anim .fl-grid-2 > .is-inview:nth-child(even) { animation-name: fl-rv-right; }

html.fl-anim .fl-cats__rail > .is-inview { animation-name: fl-rv-zoom; animation-timing-function: var(--fl-spring); animation-duration: .7s; }

html.fl-anim :is(.fl-video, .fl-banner--wide, .fl-single__media).is-inview { animation-name: fl-rv-soft; animation-duration: 1s; }

html.fl-anim .fl-footer__grid > .is-inview { --fl-rv-dist: 18px; }

/* Section headings: the title arrives slightly before its tabs/subtitle */
html.fl-anim .fl-section-head.is-inview > :nth-child(2) {
	animation: fl-rv-fade .8s var(--fl-ease) 180ms backwards;
}

/* ==========================================================================
   Hover effects (mouse / trackpad only)
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {

	/* ---------- Buttons: lift + light sweep ---------- */
	.fl-hoverfx :is(.fl-btn:not(.fl-btn--ghost), .button, input[type="submit"]) {
		background-image: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .3) 50%, transparent 65%);
		background-size: 250% 100%;
		background-repeat: no-repeat;
		background-position: 130% 0;
		transition: background-color .25s, background-position .75s var(--fl-ease), transform .25s var(--fl-ease), box-shadow .25s;
	}
	.fl-hoverfx :is(.fl-btn, .button, input[type="submit"]):not(:disabled):not(.disabled):hover {
		background-position: -30% 0;
		transform: translateY(-2px);
		box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--fl-accent) 75%, transparent);
	}
	.fl-hoverfx .fl-btn--ghost:hover { box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .25); border-color: var(--fl-ink); }
	.fl-hoverfx :is(.fl-btn, .button, input[type="submit"]):active { transform: translateY(0); transition-duration: .08s; }

	.fl-hoverfx .fl-btn-pill { transition: background .25s, color .25s, transform .3s var(--fl-ease), box-shadow .3s; }
	.fl-hoverfx .fl-btn-pill:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .35); }

	/* ---------- Underlined text links: wipe out & back in ---------- */
	.fl-hoverfx .fl-link-underline {
		text-decoration: none;
		padding-bottom: 3px;
		background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
	}
	.fl-hoverfx .fl-link-underline:hover,
	.fl-hoverfx :is(.fl-banner, .fl-hero__panel):hover .fl-link-underline {
		animation: fl-underline-swap .7s var(--fl-ease) both;
	}

	/* ---------- Product cards ---------- */
	.fl-hoverfx .fl-card__media {
		transition: border-color .35s, box-shadow .35s var(--fl-ease), transform .35s var(--fl-ease);
	}
	.fl-hoverfx .fl-card:hover .fl-card__media {
		transform: translateY(-4px);
		border-color: color-mix(in srgb, var(--fl-accent) 25%, var(--fl-line));
		box-shadow: 0 16px 32px -16px rgba(17, 17, 17, .25);
	}
	.fl-hoverfx .fl-card__img img { transition: transform .9s var(--fl-ease-out); }
	.fl-hoverfx .fl-card:hover .fl-card__img img { transform: scale(1.07); }

	/* Wishlist heart slides in on hover (always visible once saved, or on keyboard focus) */
	.fl-hoverfx .fl-card .fl-wish:not(.is-active) { opacity: 0; transform: translateY(-6px) scale(.9); transition: opacity .3s, transform .3s var(--fl-spring), color .2s; }
	.fl-hoverfx .fl-card:is(:hover, :focus-within) .fl-wish:not(.is-active) { opacity: 1; transform: none; }
	.fl-hoverfx .fl-card .fl-wish:hover { transform: scale(1.12) !important; }

	.fl-hoverfx .fl-badge { transition: transform .3s var(--fl-spring); }
	.fl-hoverfx .fl-card:hover .fl-badge { transform: scale(1.08) rotate(-4deg); }

	/* ---------- Hero panels ---------- */
	.fl-hoverfx .fl-hero__img { transition: transform 1.4s var(--fl-ease-out); }
	.fl-hoverfx .fl-hero__panel:hover .fl-hero__img { transform: scale(1.06); }
	.fl-hoverfx .fl-hero__body { transition: transform .5s var(--fl-ease); }
	.fl-hoverfx .fl-hero__panel:hover .fl-hero__body { transform: translateY(-6px); }
	.fl-hoverfx .fl-hero__panel::after { transition: opacity .5s; }
	.fl-hoverfx .fl-hero__panel::before {
		content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
		background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .22) 100%);
		opacity: 0; transition: opacity .5s;
	}
	.fl-hoverfx .fl-hero__panel:hover::before { opacity: 1; }

	/* ---------- Promo banners ---------- */
	.fl-hoverfx .fl-banner { transition: box-shadow .45s var(--fl-ease); }
	.fl-hoverfx .fl-banner:hover { box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .4); }
	.fl-hoverfx .fl-banner__img { transition: transform 1.1s var(--fl-ease-out); }
	.fl-hoverfx .fl-banner:hover .fl-banner__img { transform: scale(1.06); }
	.fl-hoverfx .fl-banner__placeholder { transition: transform 1.1s var(--fl-ease-out), opacity .5s; }
	.fl-hoverfx .fl-banner:hover .fl-banner__placeholder { transform: scale(1.08) rotate(-2deg); opacity: .85; }
	.fl-hoverfx .fl-banner__title { transition: transform .45s var(--fl-ease); }
	.fl-hoverfx .fl-banner:hover .fl-banner__title { transform: translateY(-3px); }
	.fl-hoverfx .fl-banner:hover .fl-btn-pill { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .3); }

	/* ---------- Feature boxes ---------- */
	.fl-hoverfx .fl-feature__icon { transition: transform .5s var(--fl-spring); }
	.fl-hoverfx .fl-feature:hover .fl-feature__icon { transform: translateY(-4px) rotate(-8deg) scale(1.08); }
	.fl-hoverfx .fl-feature__title { transition: color .25s; }
	.fl-hoverfx .fl-feature:hover .fl-feature__title { color: var(--fl-accent); }

	/* ---------- Category circles ---------- */
	.fl-hoverfx .fl-cat__img { transition: transform .45s var(--fl-spring), box-shadow .35s; }
	.fl-hoverfx .fl-cat:hover .fl-cat__img {
		transform: translateY(-5px);
		box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--fl-accent), 0 14px 24px -10px rgba(0, 0, 0, .3);
	}
	.fl-hoverfx .fl-cat__img img { transition: transform .7s var(--fl-ease-out); }
	.fl-hoverfx .fl-cat:hover .fl-cat__img img { transform: scale(1.1); }
	.fl-hoverfx .fl-cat__name { transition: color .25s; }
	.fl-hoverfx .fl-cat:hover .fl-cat__name { color: var(--fl-accent); }

	/* ---------- Showcase mini products ---------- */
	.fl-hoverfx .fl-mini__img { transition: box-shadow .3s, transform .3s var(--fl-ease); }
	.fl-hoverfx .fl-mini:hover .fl-mini__img { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .25); }
	.fl-hoverfx .fl-mini__img img { transition: transform .6s var(--fl-ease-out); }
	.fl-hoverfx .fl-mini:hover .fl-mini__img img { transform: scale(1.1); }
	.fl-hoverfx .fl-mini__body { transition: transform .35s var(--fl-ease); }
	.fl-hoverfx .fl-mini:hover .fl-mini__body { transform: translateX(4px); }

	/* ---------- Blog cards ---------- */
	.fl-hoverfx .fl-post-card__img { transition: box-shadow .4s var(--fl-ease), transform .4s var(--fl-ease); }
	.fl-hoverfx .fl-post-card:hover .fl-post-card__img { transform: translateY(-4px); box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .3); }
	.fl-hoverfx .fl-post-card__img img { transition: transform .9s var(--fl-ease-out); }
	.fl-hoverfx .fl-post-card:hover .fl-post-card__img img { transform: scale(1.07); }
	.fl-hoverfx .fl-post-card__title a {
		background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
		transition: background-size .45s var(--fl-ease), color .2s;
	}
	.fl-hoverfx .fl-post-card:hover .fl-post-card__title a { background-size: 100% 1.5px; }

	/* ---------- Video ---------- */
	.fl-hoverfx .fl-video { transition: box-shadow .45s var(--fl-ease); }
	.fl-hoverfx .fl-video:hover { box-shadow: 0 26px 50px -30px rgba(0, 0, 0, .55); }

	/* ---------- Header ---------- */
	.fl-hoverfx .fl-menu > li > a::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1.5px;
		background: currentColor; transform: scaleX(0); transform-origin: right center;
		transition: transform .35s var(--fl-ease);
	}
	.fl-hoverfx .fl-menu > li > a { position: relative; }
	.fl-hoverfx .fl-menu > li:hover > a::after,
	.fl-hoverfx .fl-menu > li.current-menu-item > a::after { transform: scaleX(1); transform-origin: left center; }

	.fl-hoverfx .fl-menu .sub-menu a { transition: color .2s, transform .25s var(--fl-ease), background .2s; }
	.fl-hoverfx .fl-menu .sub-menu a:hover { transform: translateX(4px); background: var(--fl-soft); }

	.fl-hoverfx .fl-action__icon { transition: transform .35s var(--fl-spring); }
	.fl-hoverfx .fl-action:hover .fl-action__icon { transform: translateY(-3px); }
	.fl-hoverfx .fl-count { transition: transform .3s var(--fl-spring); }
	.fl-hoverfx .fl-action:hover .fl-count { transform: scale(1.18); }

	.fl-hoverfx .fl-nav__sale .fl-pill-badge { transition: transform .3s var(--fl-spring); }
	.fl-hoverfx .fl-nav__sale:hover .fl-pill-badge { transform: rotate(-6deg) scale(1.1); }

	.fl-hoverfx .fl-announce__btn { transition: background .2s, color .2s; }
	.fl-hoverfx .fl-announce__btn:hover { background: var(--fl-ink); color: #fff; }
	.fl-hoverfx .fl-announce__nav { transition: transform .25s var(--fl-ease); }
	.fl-hoverfx .fl-announce__nav[data-dir="-1"]:hover { transform: translateX(-3px); }
	.fl-hoverfx .fl-announce__nav[data-dir="1"]:hover { transform: translateX(3px); }

	.fl-hoverfx .fl-search { transition: border-color .25s, box-shadow .25s; }
	.fl-hoverfx .fl-search:hover { border-color: #d6d1c9; }

	/* ---------- Product tabs ---------- */
	.fl-hoverfx .fl-tab { transition: color .2s; }
	.fl-hoverfx .fl-tab::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
		background: var(--fl-accent); transform: scaleX(0); transform-origin: right center;
		transition: transform .35s var(--fl-ease);
	}
	.fl-hoverfx .fl-tab:hover::after,
	.fl-hoverfx .fl-tab.is-active::after { transform: scaleX(1); transform-origin: left center; }

	/* ---------- Footer ---------- */
	.fl-hoverfx .fl-footer__menu a { display: inline-block; transition: color .2s, transform .3s var(--fl-ease); }
	.fl-hoverfx .fl-footer__menu a:hover { transform: translateX(4px); }
	.fl-hoverfx .fl-social a { transition: background .25s, color .25s, transform .3s var(--fl-spring), box-shadow .3s; }
	.fl-hoverfx .fl-social a:hover { transform: translateY(-3px); box-shadow: 0 8px 16px -6px color-mix(in srgb, var(--fl-accent) 60%, transparent); }
	.fl-hoverfx .fl-footer__phone { transition: color .2s; }

	.fl-hoverfx .fl-totop.is-visible:hover { transform: translateY(-3px); box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--fl-accent) 60%, transparent); }

	/* ---------- Misc ---------- */
	.fl-hoverfx .page-numbers:not(.current):not(.dots) { transition: border-color .2s, color .2s, transform .25s var(--fl-ease); }
	.fl-hoverfx a.page-numbers:hover { border-color: var(--fl-accent); color: var(--fl-accent); transform: translateY(-2px); }
	.fl-hoverfx .fl-tags a { transition: background .2s, color .2s; }
	.fl-hoverfx .fl-tags a:hover { background: var(--fl-accent); color: #fff; }
	.fl-hoverfx .fl-post-nav .nav-links a { transition: transform .3s var(--fl-ease), color .2s; }
	.fl-hoverfx .fl-post-nav .nav-previous a:hover { transform: translateX(-4px); }
	.fl-hoverfx .fl-post-nav .nav-next a:hover { transform: translateX(4px); }
}

/* Focus feedback (all devices) */
.fl-hoverfx .fl-search:focus-within { border-color: var(--fl-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fl-accent) 14%, transparent); }
.fl-hoverfx .fl-newsletter__fields input { transition: border-color .2s, box-shadow .2s; }
.fl-hoverfx .fl-newsletter__fields input:focus { outline: none; border-color: var(--fl-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fl-accent) 14%, transparent); }
