/* Bản 4: hiệu ứng icon (icon bay, lấp lánh, icon nảy, lửa lập loè). Dùng sau style.css + fx.css */

/* Icon nhiều màu bay lên ở đầu trang */
.floaties { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.floaties span { position: absolute; bottom: -50px; opacity: .6; animation: drift 15s linear infinite; }
.floaties span .i { width: 30px; height: 30px; }
.floaties span:nth-child(odd) .i { width: 22px; height: 22px; }
.floaties .c-pink { color: #E7337A; } .floaties .c-violet { color: #7C3AED; } .floaties .c-gold { color: #F59E0B; }
.floaties .c-teal { color: #0F8A80; } .floaties .c-red { color: #D6304B; } .floaties .c-orange { color: #F0624D; }
.floaties span:nth-child(1) { left: 3%; animation-duration: 16s; }
.floaties span:nth-child(2) { left: 12%; animation-delay: -6s; animation-duration: 19s; }
.floaties span:nth-child(3) { left: 21%; animation-delay: -11s; }
.floaties span:nth-child(4) { left: 31%; animation-delay: -2s; animation-duration: 13s; }
.floaties span:nth-child(5) { left: 40%; animation-delay: -8s; animation-duration: 18s; }
.floaties span:nth-child(6) { left: 49%; animation-delay: -14s; }
.floaties span:nth-child(7) { left: 58%; animation-delay: -4s; animation-duration: 17s; }
.floaties span:nth-child(8) { left: 66%; animation-delay: -10s; animation-duration: 14s; }
.floaties span:nth-child(9) { left: 74%; animation-delay: -1s; animation-duration: 20s; }
.floaties span:nth-child(10) { left: 82%; animation-delay: -7s; }
.floaties span:nth-child(11) { left: 90%; animation-delay: -12s; animation-duration: 16s; }
.floaties span:nth-child(12) { left: 97%; animation-delay: -5s; animation-duration: 13s; }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  10% { opacity: .6; }
  50% { transform: translate(24px, -55vh) rotate(160deg); }
  90% { opacity: .45; }
  100% { transform: translate(-10px, -115vh) rotate(320deg); opacity: 0; }
}

/* Lấp lánh */
.mark .twinkle { position: absolute; width: .5em; height: .5em; color: #7C3AED; filter: drop-shadow(0 2px 4px rgba(124, 58, 237, .35)); animation: twinkle 2.2s ease-in-out infinite; }
.mark .tw1 { right: -.42em; top: -.5em; }
.mark .tw2 { left: -.3em; top: -.3em; width: .32em; height: .32em; color: #F59E0B; animation-delay: -1.1s; }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .3; } 50% { transform: scale(1.1) rotate(90deg); opacity: 1; } }

/* Icon lớn trên tiêu đề mỗi phần: ô màu chuyển sắc, nảy nhẹ, vòng toả ra, lấp lánh */
.h-ico { --g1: #E7337A; --g2: #D6304B; position: relative; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 12px 26px color-mix(in srgb, var(--g2) 35%, transparent); transform: rotate(-6deg); }
.h-ico > .i { width: 32px; height: 32px; animation: bobIcon 2.6s ease-in-out infinite; }
.h-ico::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--g1); animation: ring 2.6s ease-out infinite; }
.h-ico .spark { position: absolute; width: 16px; height: 16px; color: #FFC93C; animation: twinkle 2s ease-in-out infinite; }
.h-ico .s1 { right: -10px; top: -10px; }
.h-ico .s2 { left: -12px; bottom: 2px; width: 11px; height: 11px; color: var(--g1); animation-delay: -1s; }
.h-ico.reveal.in { animation: popIn .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.h-ico.big { width: 76px; height: 76px; border-radius: 24px; }
.h-ico.big > .i { width: 40px; height: 40px; }
.g-red { --g1: #FF5C7A; --g2: #D6304B; } .g-pink { --g1: #F472B6; --g2: #C2185B; } .g-violet { --g1: #A78BFA; --g2: #7C3AED; }
.g-orange { --g1: #FDBA4D; --g2: #F0624D; } .g-teal { --g1: #34D3BE; --g2: #0F8A80; }
@keyframes bobIcon { 0%, 100% { transform: translateY(0) rotate(6deg); } 50% { transform: translateY(-4px) rotate(-4deg); } }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes popIn { 0% { transform: scale(.2) rotate(-40deg); opacity: 0; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }

/* Icon tròn trong thẻ: bật lên khi hiện, lắc khi rê chuột */
.reveal.in .icon-dot, .reveal.in .icon-x, .reveal.in .ni { animation: popDot .6s .2s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes popDot { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.card:hover .icon-dot, .card:hover .icon-x, .promise li:hover .icon-dot, .niche:hover .ni, .chips li:hover .i { animation: wiggle .6s ease-in-out; }
@keyframes wiggle { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-14deg) scale(1.12); } 50% { transform: rotate(10deg) scale(1.12); } 75% { transform: rotate(-6deg) scale(1.05); } }
.icon-dot, .niche .ni { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7), 0 6px 14px rgba(45, 27, 78, .08); }

/* Icon ở các bước: ô chuyển sắc, vòng nét đứt quay */
.step-text .step-icon { position: relative; background: linear-gradient(135deg, #FF5C7A, #C2185B); color: #fff; box-shadow: 0 10px 22px rgba(194, 24, 91, .28); }
.step-text .step-icon::after { content: ''; position: absolute; inset: -7px; border-radius: 18px; border: 2px dashed #F9A8C4; animation: spin 12s linear infinite; }
.step:nth-child(2) .step-icon { background: linear-gradient(135deg, #A78BFA, #7C3AED); box-shadow: 0 10px 22px rgba(124, 58, 237, .28); } .step:nth-child(2) .step-icon::after { border-color: #C4B5FD; }
.step:nth-child(3) .step-icon { background: linear-gradient(135deg, #FDBA4D, #F0624D); box-shadow: 0 10px 22px rgba(240, 98, 77, .28); } .step:nth-child(3) .step-icon::after { border-color: #FDD9A0; }
.step:nth-child(4) .step-icon { background: linear-gradient(135deg, #34D3BE, #0F8A80); box-shadow: 0 10px 22px rgba(15, 138, 128, .28); } .step:nth-child(4) .step-icon::after { border-color: #99E6DA; }
.step:nth-child(5) .step-icon { background: linear-gradient(135deg, #F472B6, #C2185B); } .step:nth-child(6) .step-icon { background: linear-gradient(135deg, #A78BFA, #7C3AED); box-shadow: 0 10px 22px rgba(124, 58, 237, .28); } .step:nth-child(6) .step-icon::after { border-color: #C4B5FD; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Con số: icon nhỏ phía trên */
.stat-ico { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 14px; background: rgba(255, 255, 255, .12); color: #FFC93C; border: 1px solid rgba(255, 255, 255, .2); }
.stat.in .stat-ico { animation: popIn2 .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.stat:hover .stat-ico { animation: wiggle .6s; }
@keyframes popIn2 { 0% { transform: scale(.2) rotate(-90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Dải "làm file cho": icon nảy lần lượt */
.strip .i { animation: hop 3.2s ease-in-out infinite; }
.strip span:nth-child(2) .i { animation-delay: .4s; } .strip span:nth-child(3) .i { animation-delay: .8s; } .strip span:nth-child(4) .i { animation-delay: 1.2s; }
@keyframes hop { 0%, 30%, 100% { transform: translateY(0) rotate(0); } 12% { transform: translateY(-7px) rotate(-10deg); } 22% { transform: translateY(0) rotate(4deg); } }

/* Ngọn lửa lập loè */
.heat-card .flames .i { transform-origin: 50% 90%; animation: flicker 1.4s ease-in-out infinite; }
.heat-card .flames .i:nth-child(2) { animation-delay: -.5s; } .heat-card .flames .i:nth-child(3) { animation-delay: -.9s; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 30% { transform: scale(1.12, .94) rotate(3deg); } 60% { transform: scale(.95, 1.08) rotate(-2deg); } }

/* Loại sách: icon trôi nhẹ lệch nhịp */
.niche .ni .i { animation: bobSmall 3s ease-in-out infinite; }
.niche:nth-child(3n+2) .ni .i { animation-delay: -1s; } .niche:nth-child(3n) .ni .i { animation-delay: -2s; }
@keyframes bobSmall { 50% { transform: translateY(-3px); } }

/* Dấu tick bật lên lần lượt */
.reveal.in .ticks li::before, .reveal.in.ticks li::before { animation: popDot .5s cubic-bezier(.3, 1.7, .5, 1) both; }
.ticks li:nth-child(2)::before { animation-delay: .12s !important; } .ticks li:nth-child(3)::before { animation-delay: .24s !important; }
.ticks li:nth-child(4)::before { animation-delay: .36s !important; } .ticks li:nth-child(5)::before { animation-delay: .48s !important; }
.ticks li:nth-child(6)::before { animation-delay: .6s !important; } .ticks li:nth-child(n+7)::before { animation-delay: .7s !important; }

/* Huy hiệu nổi ở hero: chấm icon nhịp đập */
.badge-float .dot .i { animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }

/* Nút mua: icon nảy */
.buy-btn .i.bounce { animation: hop 2.4s ease-in-out infinite; }

/* Con dấu bảo đảm: vòng nét đứt quay */
.seal { position: relative; }
.seal::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px dashed var(--accent); animation: spin 18s linear infinite; }

/* Mũi tên "chuyển ý": thêm lấp lánh màu */
.turn .arrow { color: #E7337A; }

@media (prefers-reduced-motion: reduce) {
  .floaties { display: none; }
}
@media (max-width: 560px) {
  .floaties span:nth-child(3n) { display: none; }
  .h-ico { width: 56px; height: 56px; }
}

/* Bằng chứng nhu cầu (ảnh chụp Etsy / Amazon) */
.proof-sec { background: linear-gradient(180deg, #F2FBF9 0%, var(--bg) 100%); }
.proof { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; margin-top: 34px; align-items: start; }
.proof-card { margin: 0; }
.proof-card:first-child { grid-row: span 2; }
.proof-card figcaption { display: grid; gap: 10px; margin-top: 16px; }
.proof-stat { display: block; position: relative; padding-left: 44px !important; background: #fff; border: 1px solid var(--border); border-left: 4px solid #0F8A80; border-radius: 12px; padding: 10px 14px; font-size: .95rem; box-shadow: 0 4px 12px rgba(45, 27, 78, .05); }
.proof-stat .i { position: absolute; left: 14px; top: 50%; margin-top: -10px; color: #0F8A80; width: 20px; height: 20px; }
.proof-stat b { color: var(--accent-hover); font-family: 'Fredoka', sans-serif; font-size: 1.05rem; }
.reveal.in .proof-stat .i { animation: popDot .6s .3s cubic-bezier(.3, 1.7, .5, 1) both; }
.proof-note { margin-top: 22px; }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } .proof-card:first-child { grid-row: auto; } }
.proof-shop { margin-top: 14px; }

/* 4 bonus dạng hộp */
.bonus-sec { background: linear-gradient(180deg, #FFF7EA 0%, var(--bg) 100%); }
.bonuses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 30px; }
.bonus { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 22px 28px 28px; box-shadow: 0 10px 30px rgba(45, 27, 78, .08); }
.bonus h3 { font-size: 1.35rem; margin: 0 0 8px; }
.bonus h3 span { display: block; font: 600 .8rem/1.4 'Inter', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-hover); }
.bonus .ticks { margin-top: 14px; }
@media (max-width: 860px) { .bonuses { grid-template-columns: 1fr; } }
.bonus .bbox-img { max-width: 340px; }

/* Con dấu "7 day guarantee" kiểu tem vàng răng cưa, nghiêng */
.seal.stamp { width: 124px; height: 124px; background: radial-gradient(circle at 35% 30%, #FFE27A, #FFC93C 60%, #F5A30B); color: var(--ink); box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--ink), 0 10px 22px rgba(45, 27, 78, .25); transform: rotate(-16deg); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.seal.stamp::after { inset: 6px; border: 2px dashed var(--ink); border-color: rgba(45, 27, 78, .55); animation: none; }
.seal.stamp b { font-size: 2.8rem; line-height: .9; }
.guarantee:hover .seal.stamp { transform: rotate(-8deg) scale(1.04); transition: transform .3s; }
details p + p { margin-top: 0; }
