/* Общие фирменные анимации и мелкие стили, используемые в шаблонах товаров и на главной. */

/*
 * WooCommerce на страницах магазина добавляет body-классу .woocommerce-page
 * глобальный сброс ".woocommerce-page img { height: auto }", который по
 * специфичности CSS перебивает утилиты высоты Tailwind (h-10, h-12 и т.п.).
 * Явно фиксируем размеры логотипа и миниатюр товара, чтобы это не ломалось
 * на /shop/, страницах товара, в корзине и т.д.
 */
.bfl-logo {
	width: auto !important;
	height: 2.5rem !important;
}

@media (min-width: 768px) {
	.bfl-logo--nav {
		height: 3rem !important;
	}
}

@media (min-width: 1024px) {
	.bfl-logo--footer {
		height: 3rem !important;
	}
}

.bfl-product-thumb {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
}

/* Выпадающая панель корзины в шапке */
#bfl-cart-panel {
	opacity: 0;
	transform: translateY(-8px) scale(0.98);
	pointer-events: none;
	transition: opacity .15s ease, transform .15s ease;
}

#bfl-cart-panel.bfl-cart-panel--open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Типографика длинных текстовых страниц (политики, оферта, статьи блога) */
.bfl-article h2 {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 1.5rem;
	color: #111827;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.bfl-article h3 {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 1.15rem;
	color: #111827;
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}

.bfl-article p {
	margin-bottom: 1.25rem;
	line-height: 1.75;
	color: #374151;
}

.bfl-article ul,
.bfl-article ol {
	margin-bottom: 1.25rem;
	padding-left: 1.5rem;
	color: #374151;
}

.bfl-article ul {
	list-style: disc;
}

.bfl-article ol {
	list-style: decimal;
}

.bfl-article li {
	margin-bottom: 0.5rem;
	line-height: 1.7;
}

.bfl-article a {
	color: #4F734A;
	text-decoration: underline;
}

.bfl-article strong {
	color: #111827;
}

.bfl-article img {
	border-radius: 1rem;
	margin: 1.5rem 0;
}

::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
	background: #D4C152;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #4F734A;
}

/* Взрыв капсулы */
.capsule-wrapper {
	perspective: 1000px;
}

.capsule-top,
.capsule-bottom {
	transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.capsule-container.is-animated .capsule-top {
	transform: translateY(-50px) rotate(-15deg);
}

.capsule-container.is-animated .capsule-bottom {
	transform: translateY(50px) rotate(15deg);
}

.capsule-glow {
	transition: all 1s ease-in-out;
	opacity: 0;
	transform: scale(0.5);
}

.capsule-container.is-animated .capsule-glow {
	opacity: 1;
	transform: scale(1.5);
}

.ing-node {
	transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
	opacity: 0;
	transform: scale(0.2) translate(0, 0);
	pointer-events: none;
}

.capsule-container.is-animated .ing-node {
	opacity: 1;
	pointer-events: auto;
}

/* Позиции разлёта — до 3 узлов (десктоп) */
@media (min-width: 768px) {
	.capsule-container.is-animated .node-1 {
		transform: scale(1) translate(-260px, -140px);
	}

	.capsule-container.is-animated .node-2 {
		transform: scale(1) translate(260px, -140px);
	}

	.capsule-container.is-animated .node-3 {
		transform: scale(1) translate(0, 180px);
	}

	.capsule-container.is-animated .node-4 {
		transform: scale(1) translate(-260px, 160px);
	}

	.capsule-container.is-animated .node-5 {
		transform: scale(1) translate(260px, 160px);
	}

	.capsule-container.is-animated .node-6 {
		transform: scale(1) translate(0, -220px);
	}
}

/* Позиции разлёта — мобильные (компактно) */
@media (max-width: 767px) {
	.capsule-core {
		transform: scale(0.85);
	}

	.capsule-container.is-animated .node-1 {
		transform: scale(0.9) translate(-110px, -200px);
	}

	.capsule-container.is-animated .node-2 {
		transform: scale(0.9) translate(110px, -200px);
	}

	.capsule-container.is-animated .node-3 {
		transform: scale(0.9) translate(0, 210px);
	}

	.capsule-container.is-animated .node-4 {
		transform: scale(0.85) translate(-110px, 20px);
	}

	.capsule-container.is-animated .node-5 {
		transform: scale(0.85) translate(110px, 20px);
	}

	.capsule-container.is-animated .node-6 {
		transform: scale(0.85) translate(0, -380px);
	}
}

/* Эффект синергии (алхимия) */
.synergy-anim-area {
	perspective: 1000px;
}

.syn-element {
	transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
	opacity: 0;
	position: absolute;
	top: 50%;
	margin-top: -32px;
	z-index: 10;
}

.syn-drop {
	left: 0%;
	transform: translateX(-150px) scale(0.5);
}

.syn-atom {
	right: 0%;
	transform: translateX(150px) scale(0.5);
}

.synergy-container.is-animated .syn-drop {
	left: 50%;
	transform: translateX(-40px) scale(1.1);
	opacity: 1;
}

.synergy-container.is-animated .syn-atom {
	right: 50%;
	transform: translateX(40px) scale(1.1);
	opacity: 1;
}

.syn-flash {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 200px;
	height: 200px;
	margin-top: -100px;
	margin-left: -100px;
	background: radial-gradient(circle, #D4C152 0%, rgba(212, 193, 82, 0.4) 40%, transparent 70%);
	border-radius: 50%;
	opacity: 0;
	transform: scale(0);
	pointer-events: none;
	z-index: 5;
}

.synergy-container.is-animated .syn-flash {
	animation: collisionExplosion 2s cubic-bezier(0.1, 0.8, 0.3, 1) 0.8s forwards;
}

@keyframes collisionExplosion {
	0% {
		transform: scale(0);
		opacity: 0;
	}

	20% {
		transform: scale(1.5);
		opacity: 1;
		box-shadow: 0 0 60px 20px rgba(212, 193, 82, 0.6);
	}

	100% {
		transform: scale(4);
		opacity: 0;
	}
}

.syn-text-glow {
	color: rgba(255, 255, 255, 0.5);
	transition: all 0.8s ease 1s;
}

.synergy-container.is-animated .syn-text-glow {
	color: #D4C152;
	text-shadow: 0 0 20px rgba(212, 193, 82, 0.8), 0 0 40px rgba(212, 193, 82, 0.4);
}

/* Голографический блик (сертификаты/маркировка) */
.hologram-glare {
	position: relative;
	overflow: hidden;
}

.hologram-glare::after {
	content: '';
	position: absolute;
	top: -100%;
	left: -100%;
	width: 50%;
	height: 300%;
	background: linear-gradient(to right,
			rgba(255, 255, 255, 0) 0%,
			rgba(255, 255, 255, 0.7) 50%,
			rgba(255, 255, 255, 0) 100%);
	transform: rotate(35deg);
	animation: hologramPass 6s infinite cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
	z-index: 20;
}

@keyframes hologramPass {
	0% {
		left: -150%;
		opacity: 0;
	}

	10% {
		opacity: 1;
	}

	30% {
		left: 200%;
		opacity: 0;
	}

	100% {
		left: 200%;
		opacity: 0;
	}
}
