/* AuraLab Festività – stili frontend (attivi solo durante una campagna) */

/* ---------- Barra promozionale ---------- */
.af-bar {
	position: relative; z-index: 101;
	background: var(--af-bar-bg, #7b1c2c); color: var(--af-bar-ink, #fff);
	font-size: .9rem; line-height: 1.35; overflow: hidden;
}
.af-bar__inner {
	display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
	padding: 9px 48px; color: inherit; text-decoration: none; text-align: center;
}
.af-bar__inner:hover { color: inherit; }
.af-bar__inner:hover .af-bar__text { text-decoration: underline; text-underline-offset: 3px; }
.af-bar__ico { width: 22px; height: 22px; flex: none; }
.af-bar__text { font-weight: 500; letter-spacing: .01em; }
.af-bar__cd {
	display: inline-flex; gap: 4px; align-items: center;
	font-variant-numeric: tabular-nums; font-size: .82rem;
	background: rgba(255, 255, 255, .16); border-radius: 20px; padding: 2px 10px;
}
.af-bar__cd:empty { display: none; }
.af-bar__close {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
	width: 32px; height: 32px; border: 0; border-radius: 50%;
	background: transparent; color: inherit; font-size: 22px; line-height: 1; opacity: .75; cursor: pointer;
}
.af-bar__close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.af-bar.is-closed { display: none; }

.af-bar--marquee .af-bar__inner { justify-content: flex-start; flex-wrap: nowrap; padding-left: 0; }
.af-bar__track { display: flex; flex: none; animation: af-marquee 38s linear infinite; }
.af-bar__item {
	display: inline-flex; align-items: center; gap: 10px; padding: 0 28px; white-space: nowrap;
	font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .82rem;
}
.af-bar__item img { width: 18px; height: 18px; }
.af-bar--marquee .af-bar__cd { position: absolute; right: 44px; background: var(--af-bar-bg); box-shadow: -20px 0 20px var(--af-bar-bg); }
@keyframes af-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Festone e decorazione logo (tema AuraLab) ---------- */
.aura-fest .site-header::after {
	content: ""; position: absolute; left: 0; right: 0; top: 100%;
	height: 28px; pointer-events: none;
	background-image: var(--af-garland, none);
	background-repeat: repeat-x; background-size: auto 100%;
}
.aura-fest--black_friday .site-header::after { height: 22px; }
.aura-fest .site-brand::after {
	content: ""; position: absolute; z-index: 3; pointer-events: none;
	width: 40px; height: 40px; right: -16px; top: 2px;
	background: var(--af-accessory, none) no-repeat center / contain;
	transform: rotate(14deg);
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .18));
}

/* ---------- Slide festiva nello slider ---------- */
.hero__slide--fest { background: var(--af-hero-bg, var(--cream)); }
.hero__slide--fest .hero__media {
	left: auto; right: 0; width: 56%;
	display: flex; align-items: center; justify-content: center;
}
.hero__slide--fest .af-art { width: 100%; height: 100%; max-height: 100%; display: block; }
.hero__slide--fest .hero__img {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%);
	mask-image: linear-gradient(90deg, transparent 0, #000 30%);
}
.hero__slide--fest.is-active .af-art { animation: af-art-in 1.2s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes af-art-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.hero__slide--fest .btn--primary { background: var(--af-hero-btn, var(--wine)); color: var(--af-hero-btn-ink, #fff); }
.hero__slide--fest .btn--primary:hover { filter: brightness(1.08); color: var(--af-hero-btn-ink, #fff); }
.hero__badge {
	display: inline-block; margin: 0 0 1.2rem;
	padding: 6px 14px; border-radius: 30px;
	background: var(--af-hero-btn, var(--wine)); color: var(--af-hero-btn-ink, #fff);
	font-weight: 600; font-size: .95rem; letter-spacing: .02em;
}
.hero__slide--dark .hero__title,
.hero__slide--dark .hero__lead,
.hero__slide--dark .kicker { color: #fff; }
.hero__slide--dark .hero__lead { opacity: .92; }
.hero__slide--dark .btn--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero__slide--dark ~ .hero__dots .hero__dot { border-color: #fff; }

/* ---------- Prodotti ---------- */
.woocommerce span.onsale.af-badge,
.woocommerce ul.products li.product .onsale.af-badge {
	background: var(--wine); color: #fff; left: auto; right: 8px; top: 8px;
	font-weight: 600; letter-spacing: .02em;
}
.aura-fest--black_friday .woocommerce span.onsale.af-badge { background: #111; color: #d4a82b; }
.af-note {
	display: flex; align-items: center; gap: 10px;
	margin: 0 0 1.2em; padding: 10px 14px; border-radius: 6px;
	background: var(--wine-soft, #f4e4e4); color: var(--wine-dark, #5c1220);
	font-size: .92rem; font-weight: 500;
}
.af-note img { width: 22px; height: 22px; flex: none; }

/* ---------- Avanzamento carrello ---------- */
.af-progress {
	display: flex; gap: 14px; align-items: center;
	margin: 0 0 20px; padding: 14px 18px; border-radius: 8px;
	background: var(--cream, #f8f1e8); border: 1px dashed var(--gold, #b8863b);
}
.af-progress__ico { width: 30px; height: 30px; flex: none; }
.af-progress__rows { flex: 1; display: grid; gap: 10px; }
.af-progress__row p { margin: 0 0 5px; font-size: .92rem; font-weight: 500; }
.af-progress__bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.af-progress__bar i { display: block; height: 100%; background: var(--wine, #7b1c2c); border-radius: 3px; transition: width .4s; }
.af-progress__row.is-ok p { color: #1d7a45; }
.af-progress__row.is-ok .af-progress__bar i { background: #1d7a45; }
.cart_totals .af-progress { margin-top: 0; }

/* ---------- Decorazioni animate ---------- */
.af-decor { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.af-p { position: absolute; display: block; width: var(--s, 18px); height: var(--s, 18px); will-change: transform; }
.af-p svg { width: 100%; height: 100%; display: block; overflow: visible; }

.af-p--fall {
	top: -40px; left: var(--x);
	animation: af-fall var(--d, 12s) linear var(--delay, 0s) infinite;
	opacity: var(--o, .9);
}
@keyframes af-fall {
	0% { transform: translate3d(0, -5vh, 0) rotate(0deg); }
	100% { transform: translate3d(var(--drift, 40px), 108vh, 0) rotate(var(--rot, 180deg)); }
}
.af-p--snow svg { filter: drop-shadow(0 0 1.5px rgba(20, 50, 80, .45)); }

.af-p--fly {
	top: var(--y); left: -80px;
	animation: af-fly var(--d, 16s) linear var(--delay, 0s) infinite;
}
.af-p--fly svg { animation: af-flap .28s ease-in-out infinite alternate; transform-origin: center; }
@keyframes af-fly {
	0% { transform: translate3d(0, 0, 0); }
	25% { transform: translate3d(28vw, -30px, 0); }
	50% { transform: translate3d(56vw, 20px, 0); }
	75% { transform: translate3d(84vw, -25px, 0); }
	100% { transform: translate3d(calc(100vw + 160px), 0, 0); }
}
@keyframes af-flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }

.af-p--twinkle {
	top: var(--y); left: var(--x);
	animation: af-twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
	opacity: 0;
}
@keyframes af-twinkle {
	0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
	50% { opacity: .95; transform: scale(1) rotate(45deg); }
}

/* ---------- Anteprima per l'amministratore ---------- */
.af-preview {
	position: fixed; left: 16px; bottom: 16px; z-index: 100000;
	background: #1d2327; color: #fff; font: 500 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	padding: 9px 14px; border-radius: 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.af-preview a { color: #72aee6; margin-left: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.hero__slide--fest { flex-direction: column; align-items: stretch; }
	.hero__slide--fest .hero__media { position: relative; inset: auto; width: 100%; height: 46vw; max-height: 380px; }
	.hero__slide--fest .hero__media::after { display: none; }
	.hero__slide--fest .hero__img { -webkit-mask-image: none; mask-image: none; }
	.hero__slide--fest .hero__content { padding-top: 8px; }
}
@media (max-width: 640px) {
	.af-bar { font-size: .82rem; }
	.af-bar__inner { padding: 8px 40px 8px 14px; gap: 6px; }
	.af-bar__ico { display: none; }
	.af-bar--marquee .af-bar__cd { display: none; }
	.af-bar__cd { font-size: .74rem; padding: 1px 8px; }
	.aura-fest .site-header::after { height: 20px; }
	.aura-fest .site-brand::after { width: 30px; height: 30px; right: -10px; }
	.hero__slide--fest .hero__media { height: 62vw; }
	.af-progress { padding: 12px; }
	.af-progress__ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.af-decor { display: none; }
	.af-bar__track { animation: none; }
	.hero__slide--fest.is-active .af-art { animation: none; }
}
.woocommerce div.product > span.onsale.af-badge { left: 8px; right: auto; top: 8px; z-index: 9; }
