/* =========================================================
   Hiệu ứng nâng cao – nạp sau style.css
   ========================================================= */

/* ---------- Nền động: các đốm màu trôi + hạt nhiễu ---------- */
/* Tối ưu: đốm màu vẽ bằng radial-gradient (thay filter: blur 90px rất nặng), chỉ animate transform → chạy trên GPU */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); contain: strict; }
.bg-fx .blob { position: absolute; border-radius: 50%; will-change: transform; }
.bg-fx .b1 { width: 900px; height: 900px; top: -330px; left: -330px; background: radial-gradient(circle, rgba(255, 77, 46, .33), rgba(255, 77, 46, .12) 35%, transparent 68%); animation: drift1 22s ease-in-out infinite alternate; }
.bg-fx .b2 { width: 820px; height: 820px; bottom: -340px; right: -280px; background: radial-gradient(circle, rgba(124, 58, 237, .26), rgba(124, 58, 237, .09) 35%, transparent 68%); animation: drift2 26s ease-in-out infinite alternate; }
.bg-fx .b3 { width: 700px; height: 700px; top: calc(40% - 160px); left: calc(55% - 160px); background: radial-gradient(circle, rgba(255, 176, 32, .18), rgba(255, 176, 32, .06) 35%, transparent 68%); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(40vw, 30vh) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-45vw, -40vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-30vw, 25vh) scale(.8); } }
.bg-fx::after {
  content: ""; position: absolute; inset: 0; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html, body { overflow-x: clip; }
body { background: transparent; }
.section-alt { background: rgba(20, 22, 27, .62); } /* bỏ backdrop-filter trên vùng lớn – nền đã mờ sẵn nên nhìn như cũ */

/* Tối ưu: tạm dừng animation khi vùng đó ra khỏi màn hình (effects.js gắn .paused) */
.paused, .paused *, .paused::before, .paused::after { animation-play-state: paused !important; }
/* Tối ưu: trình duyệt bỏ qua vẽ các section chưa cuộn tới */
main > .section:not(:first-child) { content-visibility: auto; contain-intrinsic-size: auto 700px; }
.footer { background: rgba(14, 15, 19, .85); }

/* ---------- Thanh tiến trình cuộn ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 200; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-2), #7c3aed); box-shadow: 0 0 12px var(--accent); }

/* ---------- Header thu gọn khi cuộn ---------- */
.header { transition: background .3s, box-shadow .3s; }
.header .container { transition: height .3s; }
.header.scrolled { background: rgba(12, 13, 16, .92); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.header.scrolled .container { height: 60px; }
.logo-mark { position: relative; overflow: hidden; animation: logoGlow 3s ease-in-out infinite; }
@keyframes logoGlow { 50% { box-shadow: 0 0 22px rgba(255, 77, 46, .7); } }
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::before {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s;
}
.nav a:not(.btn):hover::before { transform: scaleX(1); transform-origin: left; }

/* ---------- Đèn theo chuột ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%;
  pointer-events: none; z-index: 0; background: radial-gradient(circle, rgba(255, 77, 46, .14), transparent 65%);
  transition: opacity .3s; will-change: transform;
}
main, .footer { position: relative; z-index: 1; }

/* ---------- Nút: vệt sáng quét + nam châm ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; z-index: -1;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .6s;
}
.btn:hover::after { left: 140%; }
.btn-primary { box-shadow: 0 10px 30px -8px rgba(255, 77, 46, .7); }
.btn-primary:hover { box-shadow: 0 14px 40px -6px rgba(255, 77, 46, .9); }
.btn-zalo { box-shadow: 0 10px 30px -8px rgba(0, 104, 255, .7); }

/* ---------- Thẻ: viền gradient + đèn rọi theo chuột + nghiêng 3D ---------- */
.feature, .product, .review, .contact-item, .stats > div, .form {
  position: relative; transform-style: preserve-3d;
  --mx: 50%; --my: 50%;
}
.feature::before, .product::before, .review::before, .contact-item::before, .stats > div::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(255, 120, 60, .16), transparent 45%);
}
.feature:hover::before, .product:hover::before, .review:hover::before, .contact-item:hover::before, .stats > div:hover::before { opacity: 1; }
.feature::after, .product::after, .review::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--accent), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s;
}
.feature:hover::after, .product:hover::after, .review:hover::after { opacity: 1; }
.tilt { transition: transform .15s ease-out, border-color .2s; }

.feature .ico { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .3s; }
.feature:hover .ico { transform: rotate(-8deg) scale(1.15); background: var(--accent); color: #fff; }

/* Sản phẩm */
.product-img { overflow: hidden; }
.product-img::before {
  content: ""; position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 46, .35), transparent 70%); filter: blur(20px);
  transition: transform .5s; transform: scale(.7);
}
.product:hover .product-img::before { transform: scale(1.3); }
.product-img img, .product-img .ph { position: relative; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.product:hover .product-img img, .product:hover .product-img .ph { transform: scale(1.1) rotate(-2deg); }
.product-img .ph { background: linear-gradient(135deg, #4a4f5c, #2a2e38); -webkit-background-clip: text; background-clip: text; color: transparent; }
.product:hover .product-img .ph { background-image: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.badge { animation: badgePop 2.4s ease-in-out infinite; }
@keyframes badgePop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.price { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price small { -webkit-text-fill-color: var(--muted); }

/* ---------- Tiêu đề section ---------- */
.section-head h2 { background: linear-gradient(180deg, #fff 30%, #9aa0ad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head::after {
  content: ""; display: block; width: 0; height: 3px; margin: 18px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .8s .2s cubic-bezier(.2, .8, .2, 1);
}
.section-head.visible::after { width: 70px; }

/* ---------- Hiện dần: nhiều kiểu + so le ---------- */
.reveal { opacity: 0; transform: translateY(40px); filter: blur(6px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1), filter .8s; transition-delay: var(--d, 0s); }
.reveal.from-left { transform: translateX(-60px); }
.reveal.from-right { transform: translateX(60px); }
.reveal.zoom { transform: scale(.85); }
.reveal.visible { opacity: 1; transform: none; filter: none; }

/* ---------- HERO ---------- */
.hero { padding: 80px 0 60px; min-height: calc(100vh - 70px); display: flex; align-items: center; }
.hero .container { width: 100%; }
.hero::before { display: none; }
.hero h1 { font-size: clamp(36px, 5.8vw, 70px); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; transform: translateY(110%); animation: lineUp .9s cubic-bezier(.2, .8, .2, 1) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .15s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .3s; }
@keyframes lineUp { to { transform: none; } }
.hero .fade-in { opacity: 0; animation: fadeUp .8s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2), #ff4d8d, var(--accent)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradMove 6s linear infinite; }
@keyframes gradMove { to { background-position: 300% 0; } }

/* Chữ đổi luân phiên */
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator > b { grid-area: 1 / 1; font-weight: inherit; opacity: 0; transform: translateY(60%) rotateX(-80deg); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.rotator > b.on { opacity: 1; transform: none; }
.rotator > b.off { opacity: 0; transform: translateY(-60%) rotateX(80deg); }

.eyebrow { position: relative; overflow: hidden; border: 1px solid rgba(255, 77, 46, .35); }
.eyebrow::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); transform: translateX(-100%); animation: shine 3s 1s infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }

/* Loa trong hero */
.speaker-art { min-height: 480px; perspective: 1000px; }
.speaker-art .tilt-wrap { position: relative; transition: transform .2s ease-out; transform-style: preserve-3d; }
.speaker { position: relative; z-index: 2; animation: float 6s ease-in-out infinite; overflow: hidden; }
@keyframes float { 50% { transform: translateY(-14px); } }
.speaker::before { /* viền LED RGB */
  content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1; padding: 2px;
  background: conic-gradient(from var(--ang, 0deg), #ff4d2e, #ffb020, #22d3ee, #7c3aed, #ff4d8d, #ff4d2e);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAng 4s linear infinite;
}
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spinAng { to { --ang: 360deg; } }
.speaker-glow { position: absolute; inset: 10% 5%; border-radius: 40px; z-index: 0; filter: blur(50px); opacity: .55;
  background: conic-gradient(from var(--ang, 0deg), #ff4d2e, #ffb020, #22d3ee, #7c3aed, #ff4d2e); animation: spinAng 4s linear infinite; }
.speaker .woofer { position: relative; box-shadow: 0 0 0 6px #1b1d23, 0 0 40px rgba(255, 77, 46, .35) inset; animation: bassHit .46s cubic-bezier(.3, 0, .2, 1) infinite; }
.speaker .woofer::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .6); box-shadow: 0 0 18px rgba(34, 211, 238, .6); animation: ledRing 2.4s linear infinite; }
@keyframes ledRing { 0%, 100% { border-color: rgba(34, 211, 238, .7); box-shadow: 0 0 18px rgba(34, 211, 238, .6); } 33% { border-color: rgba(255, 77, 46, .8); box-shadow: 0 0 18px rgba(255, 77, 46, .7); } 66% { border-color: rgba(124, 58, 237, .8); box-shadow: 0 0 18px rgba(124, 58, 237, .7); } }
@keyframes bassHit { 0% { transform: scale(1); } 12% { transform: scale(1.06); } 100% { transform: scale(1); } }
.speaker .tweeter { animation: treble 1.2s ease-in-out infinite; }
@keyframes treble { 50% { box-shadow: 0 0 24px rgba(255, 255, 255, .35); } }
.speaker .knobs i { transition: transform .3s; }
.speaker .knobs i:nth-child(1) { animation-delay: 0s; } .speaker .knobs i:nth-child(3) { animation-delay: .4s; } .speaker .knobs i:nth-child(5) { animation-delay: .8s; }
.speaker-label { font-size: 12px; font-weight: 800; letter-spacing: 3px; color: #6b7080; }

/* Ảnh loa thật trong hero */
.hero-product { position: relative; z-index: 2; width: min(540px, 44vw); animation: float 6s ease-in-out infinite; }
.hero-product img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .65)) drop-shadow(0 0 24px rgba(255, 77, 46, .25)); animation: thump .92s cubic-bezier(.3, 0, .2, 1) infinite; transform-origin: 50% 100%; }
@keyframes thump { 0%, 50%, 100% { transform: scale(1); } 8% { transform: scale(1.012); } }
.hero-shine { /* vệt sáng quét chéo qua thân loa, theo đúng hình khối nhờ mask */
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%);
  background-size: 250% 100%; background-position: 120% 0; animation: sweep 4.5s 1.2s ease-in-out infinite;
  -webkit-mask: url("../images/hero-pa-9900.webp") center / 100% 100% no-repeat; mask: url("../images/hero-pa-9900.webp") center / 100% 100% no-repeat;
}
@keyframes sweep { 0% { background-position: 120% 0; } 45%, 100% { background-position: -20% 0; } }
.hero-floor { position: absolute; left: 8%; right: 8%; bottom: -26px; height: 40px; border-radius: 50%; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(255, 77, 46, .45), rgba(255, 77, 46, 0) 70%); filter: blur(4px); animation: floorPulse 6s ease-in-out infinite; }
@keyframes floorPulse { 50% { transform: scaleX(.85); opacity: .6; } }
.speaker-art .speaker-glow { inset: 5% 0; }
.speaker-art .wave { border-color: rgba(255, 77, 46, .4); }

/* Sóng âm lan ra */
.wave { position: absolute; top: 50%; left: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; border: 2px solid rgba(255, 77, 46, .5); z-index: 1; animation: wave 3s cubic-bezier(.2, .6, .4, 1) infinite; }
.wave:nth-child(2) { animation-delay: 1s; } .wave:nth-child(3) { animation-delay: 2s; }
@keyframes wave { from { transform: scale(.6); opacity: .9; } to { transform: scale(2); opacity: 0; } }

/* Nốt nhạc bay */
.note { position: absolute; z-index: 3; font-size: 28px; color: var(--accent-2); opacity: 0; text-shadow: 0 0 16px currentColor; animation: noteFly 5s ease-in infinite; }
.note:nth-of-type(2) { left: 12%; top: 60%; animation-delay: 1.2s; color: var(--accent); }
.note:nth-of-type(3) { right: 10%; top: 45%; animation-delay: 2.4s; color: #22d3ee; }
.note:nth-of-type(4) { right: 22%; top: 70%; animation-delay: 3.4s; }
.note:nth-of-type(5) { left: 22%; top: 30%; animation-delay: .6s; color: #ff4d8d; }
@keyframes noteFly { 0% { opacity: 0; transform: translateY(0) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-180px) translateX(30px) rotate(25deg); } }

/* Thẻ nổi quanh loa */
.chip { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: rgba(26, 29, 36, .75); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4); font-size: 13px; animation: float 5s ease-in-out infinite; }
.chip b { display: block; font-size: 16px; }
.chip span { color: var(--muted); }
.chip .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: 16px; }
.chip.c1 { top: 12%; left: -4%; } .chip.c2 { bottom: 16%; right: -6%; animation-delay: 1.5s; } .chip.c3 { bottom: 4%; left: 4%; animation-delay: 3s; }

/* Equalizer */
.eq { display: flex; align-items: flex-end; gap: 4px; height: 34px; }
.eq i { width: 5px; border-radius: 3px; background: linear-gradient(to top, var(--accent), var(--accent-2)); animation: eq 1s ease-in-out infinite alternate; }
.eq i:nth-child(1) { animation-duration: .7s; } .eq i:nth-child(2) { animation-duration: .5s; } .eq i:nth-child(3) { animation-duration: .9s; }
.eq i:nth-child(4) { animation-duration: .6s; } .eq i:nth-child(5) { animation-duration: .8s; } .eq i:nth-child(6) { animation-duration: .55s; }
.eq i:nth-child(7) { animation-duration: .75s; }
@keyframes eq { from { height: 15%; } to { height: 100%; } }
.hero-eq { display: flex; align-items: center; gap: 14px; margin-top: 34px; color: var(--muted); font-size: 14px; }

.scroll-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 14px; }
.scroll-hint::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { to { transform: translateY(14px); opacity: 0; } }

/* ---------- Dải chữ chạy ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(255, 77, 46, .12), rgba(124, 58, 237, .12)); padding: 18px 0; transform: rotate(-1.5deg); margin: 20px -20px; position: relative; z-index: 1; }
.marquee-track { display: flex; gap: 50px; width: max-content; animation: marquee 30s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-size: clamp(20px, 2.6vw, 30px); font-weight: 800; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px #6b7080; display: flex; align-items: center; gap: 50px; }
.marquee span:nth-child(even) { color: var(--text); -webkit-text-stroke: 0; }
.marquee span::after { content: "✦"; color: var(--accent); -webkit-text-stroke: 0; font-size: .7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, #ff4d2e, #ff8a1f, #ff4d8d, #7c3aed); background-size: 300% 300%; animation: ctaBg 10s ease infinite; }
@keyframes ctaBg { 50% { background-position: 100% 50%; } }
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); animation: wave 4s linear infinite; width: 300px; height: 300px; }
.cta::before { top: -150px; left: -100px; } .cta::after { bottom: -150px; right: -100px; animation-delay: 2s; }
.cta > * { position: relative; z-index: 1; }

/* ---------- Đánh giá ---------- */
.stars { display: inline-block; background: linear-gradient(90deg, var(--accent-2) 50%, #3a3f4b 50%); background-size: 200% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; transition: background-position 1.2s .3s; }
.review.visible .stars { background-position: 0 0; }

/* ---------- Page hero (trang con) ---------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero h1 { background: linear-gradient(180deg, #fff, #9aa0ad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: fadeUp .8s both; }
.page-hero p, .page-hero .breadcrumb { animation: fadeUp .8s .15s both; }
.page-hero .eq { justify-content: center; margin: 18px auto 0; height: 24px; opacity: .8; }

/* ---------- Bộ lọc: viên trượt ---------- */
.filters button { transition: all .3s cubic-bezier(.2, .8, .2, 1); }
.filters button.active { box-shadow: 0 8px 24px -6px rgba(255, 77, 46, .8); transform: translateY(-2px); }
.products .product { animation: cardIn .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }

/* ---------- Modal ---------- */
.modal { opacity: 0; visibility: hidden; display: grid; transition: opacity .3s, visibility .3s; backdrop-filter: blur(8px); }
.modal.open { opacity: 1; visibility: visible; }
.modal-box { transform: translateY(30px) scale(.95); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.modal.open .modal-box { transform: none; }
.modal-content tr { opacity: 0; transform: translateX(20px); }
.modal.open .modal-content tr { animation: rowIn .4s forwards; }
@keyframes rowIn { to { opacity: 1; transform: none; } }

/* ---------- Timeline ---------- */
.timeline { position: relative; border-left-color: transparent; }
.timeline::before { content: ""; position: absolute; left: -2px; top: 0; width: 2px; height: var(--tl, 0%); background: linear-gradient(var(--accent), var(--accent-2)); box-shadow: 0 0 10px var(--accent); transition: height .1s linear; }
.timeline::after { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 2px; background: var(--line); z-index: -1; }
.timeline-item::before { transition: transform .4s, box-shadow .4s; }
.timeline-item.visible::before { transform: scale(1.3); box-shadow: 0 0 0 4px var(--bg), 0 0 18px var(--accent); }

/* ---------- Giới thiệu: hình ---------- */
.about-visual { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 50%, #2a1712, #121419 70%); color: transparent; }
.about-visual::before { content: "P.A"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; z-index: 2; }
.about-visual .wave { width: 200px; height: 200px; margin: -100px 0 0 -100px; }

/* ---------- Form ---------- */
.form input, .form select, .form textarea { transition: border-color .2s, box-shadow .2s, transform .2s; }
.form input:focus, .form select:focus, .form textarea:focus { box-shadow: 0 0 0 4px rgba(255, 77, 46, .15); transform: translateY(-1px); }

/* ---------- Loader đầu trang ---------- */
.loader { position: fixed; inset: 0; z-index: 999; background: var(--bg); display: grid; place-items: center; transition: opacity .5s, visibility .5s; }
.loader .eq { height: 50px; gap: 6px; } .loader .eq i { width: 7px; }
.loader.done { opacity: 0; visibility: hidden; }
body.leaving main { opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; }

/* ---------- Ảnh poster sản phẩm thật ---------- */
.product-img.poster { aspect-ratio: 3 / 4; cursor: pointer; background: #121419; }
.product-img.poster::before { display: none; }
.product-img.poster img { width: 100%; height: 100%; padding: 0; object-fit: cover; object-position: 50% 30%; }
.product:hover .product-img.poster img { transform: scale(1.06); }
.product-img.poster::after { /* vệt sáng quét qua ảnh khi rê chuột */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform .8s;
}
.product:hover .product-img.poster::after { transform: translateX(100%); }
.product-img:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tagline { color: var(--muted); font-size: 14px; font-style: italic; margin-top: -6px; }
.price-wrap small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.product-foot { align-items: flex-end; }

/* Khung chi tiết: poster bên trái, thông tin bên phải */
.modal-box { max-width: 940px; }
.m-img { position: relative; background: #121419; display: flex; flex-direction: column; }
.modal-box .product-img.poster { aspect-ratio: auto; flex: 1; min-height: 0; cursor: default; }
.modal-box .product-img.poster img { object-fit: contain; object-position: center; height: 100%; max-height: 90vh; }
.modal-box .product-img.poster::after { display: none; }
.poster-link { display: block; text-align: center; padding: 10px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.poster-link:hover { color: var(--accent); }
.modal-content .tagline { margin: -6px 0 12px; }
.feat-list { list-style: none; display: grid; gap: 8px; margin: 18px 0 6px; }
.feat-list li { position: relative; padding-left: 28px; font-size: 14px; }
.feat-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(255, 77, 46, .15); color: var(--accent); }
.colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 14px; font-size: 14px; }
.colors span { color: var(--muted); }
.colors b { font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); font-size: 13px; }
.made-in { font-size: 13px; color: var(--accent-2); font-weight: 600; margin-bottom: 18px; }

/* ---------- Nút menu 3 gạch → X ---------- */
.menu-toggle { width: 44px; height: 44px; position: relative; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.menu-toggle span:nth-child(1) { top: 14px; } .menu-toggle span:nth-child(2) { top: 21px; } .menu-toggle span:nth-child(3) { top: 28px; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-shade, .mobile-bar { display: none; }

/* =========================================================
   PHIÊN BẢN ĐIỆN THOẠI (≤ 760px)
   ========================================================= */
@media (max-width: 760px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
  .container { padding: 0 16px; }

  /* Header + ngăn kéo menu */
  .header { backdrop-filter: none; background: rgba(12, 13, 16, .96); }
  .header .container, .header.scrolled .container { height: 60px; }
  .logo { font-size: 17px; } .logo-mark { width: 34px; height: 34px; }
  .menu-toggle { display: block; z-index: 120; }
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(82vw, 320px); z-index: 110;
    display: flex; flex-direction: column; justify-content: flex-start; gap: 4px;
    padding: calc(80px + env(safe-area-inset-top)) 20px 24px; background: #121419; border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .4s cubic-bezier(.2, .8, .2, 1); box-shadow: -20px 0 60px rgba(0, 0, 0, .5);
  }
  .nav.open { transform: none; }
  .nav a:not(.btn) { width: 100%; padding: 15px 16px; border: 0; border-radius: 12px; font-size: 17px; color: var(--text);
    opacity: 0; transform: translateX(30px); transition: opacity .3s, transform .4s cubic-bezier(.2, .8, .2, 1), background .2s; }
  .nav a:not(.btn)::before { display: none; }
  .nav a.active { background: rgba(255, 77, 46, .12); color: var(--accent); }
  .nav.open a { opacity: 1; transform: none; }
  .nav.open a:nth-child(2) { transition-delay: .05s; } .nav.open a:nth-child(3) { transition-delay: .1s; } .nav.open a:nth-child(4) { transition-delay: .15s; }
  .nav .btn { margin: 16px 0 0; width: 100%; padding: 15px; border: 0; }
  body.menu-open .header { z-index: 115; } /* đưa ngăn kéo lên trên lớp phủ */
  .nav-shade { display: block; position: fixed; inset: 0; z-index: 105; background: rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  .nav-shade.open { opacity: 1; visibility: visible; }
  body.menu-open { overflow: hidden; }

  /* Thanh hành động dưới đáy */
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 8px; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(18, 20, 25, .97); border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .4); animation: barUp .5s .4s cubic-bezier(.2, .8, .2, 1) both;
  }
  @keyframes barUp { from { transform: translateY(100%); } }
  .mobile-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 0; border-radius: 12px; transition: transform .15s, color .2s; }
  .mobile-bar a:active { transform: scale(.92); color: var(--text); }
  .mobile-bar .mb-zalo { flex-direction: row; justify-content: center; gap: 8px; height: 50px; background: var(--zalo); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 8px 24px -6px rgba(0, 104, 255, .8); position: relative; overflow: hidden; }
  .mobile-bar .mb-zalo b { background: #fff; color: var(--zalo); border-radius: 8px; padding: 2px 6px; font-size: 12px; }
  .mobile-bar .mb-zalo::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .4), transparent); transform: skewX(-20deg); animation: shine 2.8s 1.2s infinite; }
  .mobile-bar a:first-child svg { animation: ring 2.5s 2s infinite; transform-origin: 50% 50%; color: #4ade80; }
  @keyframes ring { 0%, 20%, 100% { transform: rotate(0); } 4%, 12% { transform: rotate(-15deg); } 8%, 16% { transform: rotate(15deg); } }
  .float-zalo { display: none; }

  /* Hero: chữ trước, loa sau */
  .hero { padding: 28px 0 40px; min-height: auto; }
  .hero .container { gap: 26px; }
  .speaker-art { order: 0; min-height: 330px; }
  .hero-product { width: min(360px, 92vw); }
  .hero-floor { bottom: -18px; height: 28px; }
  .speaker { width: min(210px, 58vw); border-radius: 22px; padding: 18px; }
  .speaker .knobs i { width: 13px; height: 13px; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); letter-spacing: -1px; }
  .hero p { font-size: 16px; margin: 14px 0 22px; }
  .hero-actions .btn { flex: 1; justify-content: center; padding: 14px 16px; }
  .hero-stats { gap: 0; margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; background: rgba(26, 29, 36, .7); border: 1px solid var(--line); border-radius: 16px; padding: 14px 6px; }
  .hero-stats strong { font-size: 20px; } .hero-stats span { font-size: 12px; line-height: 1.3; display: block; }
  .hero-eq { margin-top: 20px; }
  .chip { display: flex; padding: 7px 10px; gap: 7px; font-size: 11px; border-radius: 12px; }
  .chip b { font-size: 13px; } .chip .dot { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
  .speaker-art { padding: 34px 0 62px; }
  .chip.c1 { top: auto; bottom: 0; left: 0; } .chip.c2 { top: auto; bottom: 0; right: 0; } .chip.c3 { top: 0; bottom: auto; right: 0; left: auto; }
  .note { font-size: 22px; }

  /* Section gọn hơn */
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head p { font-size: 15px; }
  .marquee { padding: 12px 0; }

  /* Tính năng: lưới 2 cột gọn */
  .features { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature { padding: 18px 14px; }
  .feature .ico { width: 40px; height: 40px; margin-bottom: 12px; }
  .feature h3 { font-size: 15px; line-height: 1.3; } .feature p { font-size: 13px; }

  /* Vuốt ngang: sản phẩm nổi bật + đánh giá */
  #featured-products, .reviews {
    display: flex; overflow-x: auto; gap: 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin: 0 -16px; padding: 6px 16px 18px; scroll-padding: 0 16px; scrollbar-width: none;
  }
  #featured-products::-webkit-scrollbar, .reviews::-webkit-scrollbar { display: none; }
  #featured-products > *, .reviews > * { flex: 0 0 82%; scroll-snap-align: start; }
  .swipe-dots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
  .swipe-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .3s, background .3s; }
  .swipe-dots i.on { width: 20px; background: var(--accent); }

  /* Trang sản phẩm: 2 cột, bộ lọc vuốt ngang */
  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px 24px; padding: 4px 16px 8px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; padding: 10px 18px; }
  #all-products { grid-template-columns: 1fr 1fr; gap: 12px; }
  #all-products .product-body { padding: 12px; gap: 8px; }
  #all-products .product h3 { font-size: 15px; }
  #all-products .specs span:nth-child(n+2) { display: none; }
  #all-products .product-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  #all-products .price { font-size: 17px; }
  #all-products .btn-sm { justify-content: center; }
  .badge { font-size: 10px; padding: 3px 9px; top: 10px; left: 10px; }
  .product-img .ph { font-size: 30px; }
  .product:active { transform: scale(.98); }

  /* Chi tiết sản phẩm: bottom sheet */
  .modal { place-items: end center; padding: 0; }
  .modal-box { grid-template-columns: 1fr; border-radius: 22px 22px 0 0; max-height: 88vh; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
  .modal-box::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #4a4f5c; z-index: 3; }
  .modal-box .product-img { min-height: 180px; aspect-ratio: 16 / 9; }
  .modal-box .product-img.poster { flex: none; height: 46vh; aspect-ratio: auto; }
  .modal-box .product-img.poster img { object-fit: cover; object-position: 50% 55%; max-height: none; }
  .product-foot { align-items: stretch; }
  .tagline { font-size: 13px; }
  #all-products .tagline { display: none; }
  #all-products .product-cat { font-size: 10px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .modal-content { padding: 20px 18px 26px; }
  .modal-content h3 { font-size: 22px; }
  .modal-content .hero-actions .btn { flex: 1; justify-content: center; }

  /* Giới thiệu / liên hệ */
  .about-grid { gap: 30px; }
  .about-visual { max-width: 280px; margin: 0 auto; width: 100%; }
  .stats { gap: 12px; } .stats div { padding: 20px 10px; } .stats strong { font-size: 26px; } .stats span { font-size: 13px; }
  .form { padding: 22px 16px; }
  .form input, .form select, .form textarea { font-size: 16px; } /* tránh iOS tự phóng to khi gõ */
  .map { height: 260px; }
  .cta .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .footer { padding: 44px 0 24px; }
  .footer-grid { gap: 28px; }
  .page-hero { padding: 40px 0 30px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .chip.c1 { left: 0; } .chip.c2 { right: 0; }
}
@media (max-width: 760px) {
  .wave { width: 220px; height: 220px; margin: -110px 0 0 -110px; }
  .cursor-glow, .scroll-hint { display: none; }
  .marquee { margin: 10px -20px; }
}
@media (hover: none) { .cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { filter: none; }
  .hero h1 .line > span, .hero .fade-in { transform: none; opacity: 1; }
  .rotator > b { transition: none; }
  .loader { display: none; }
}

/* Nút Zalo nhỏ cạnh đại diện vùng */
.rep-zalo{display:inline-block;margin-left:6px;padding:1px 9px;border-radius:99px;background:var(--zalo);color:#fff!important;font-size:12px;font-weight:700;line-height:1.6;vertical-align:1px}
.rep-zalo:hover{filter:brightness(1.12)}
