/* Hiệu ứng khối Flashsale (bb-flash-fx.js) */
body.bb-xmas.view-home .home-flashsale.fxf{background:
 radial-gradient(760px 300px at 90% -10%,rgba(241,207,106,.26),transparent 62%),
 radial-gradient(620px 340px at 2% 112%,rgba(170,40,70,.3),transparent 65%),
 repeating-linear-gradient(45deg,rgba(241,207,106,.05) 0 1px,transparent 1px 26px),
 repeating-linear-gradient(-45deg,rgba(241,207,106,.05) 0 1px,transparent 1px 26px),
 linear-gradient(145deg,#091a3a 0%,#10285a 52%,#06122b 100%)!important;
 border:1px solid rgba(240,201,105,.6)!important;
 box-shadow:0 26px 60px rgba(2,8,20,.55),inset 0 0 0 6px rgba(6,16,38,.85),inset 0 0 0 7px rgba(241,207,106,.2)!important}
body.bb-xmas.view-home .home-flashsale.fxf::after{content:"";position:absolute;left:10%;right:10%;top:0;height:2px;background:linear-gradient(90deg,transparent,#f1cf6a,transparent);background-size:200% 100%;animation:fxf-shine 4.5s linear infinite;pointer-events:none}
@keyframes fxf-shine{0%{background-position:200% 0}100%{background-position:-200% 0}}
body.bb-xmas.view-home .home-flashsale.fxf .fs-heading h2{background:linear-gradient(180deg,#fff 25%,#f6dc94);-webkit-background-clip:text;background-clip:text;color:transparent!important}
body.bb-xmas.view-home .home-flashsale.fxf .fs-heading h2 svg{animation:fxf-bolt 1.8s ease-in-out infinite;color:#f1cf6a!important;filter:drop-shadow(0 0 8px rgba(241,207,106,.7))}
@keyframes fxf-bolt{0%,100%{transform:scale(1) rotate(0)}45%{transform:scale(1.22) rotate(-8deg)}60%{transform:scale(1.05) rotate(4deg)}}

/* thẻ lật vào lần lượt */
body.bb-xmas.view-home .home-flashsale.fxf .bbx-fl-card:not(.fxf-done){opacity:0;transform:perspective(900px) rotateY(-100deg) translateY(50px) scale(.8);transform-origin:50% 60%;backface-visibility:hidden}
body.bb-xmas.view-home .home-flashsale.fxf .bbx-fl-card.fxf-in{animation:fxf-flip .95s cubic-bezier(.2,.9,.25,1.12) forwards}
@keyframes fxf-flip{0%{opacity:0;transform:perspective(900px) rotateY(-100deg) translateY(50px) scale(.8)}35%{opacity:1}70%{transform:perspective(900px) rotateY(12deg) translateY(-6px) scale(1.04)}100%{opacity:1;transform:perspective(900px) rotateY(0) translateY(0) scale(1)}}
body.bb-xmas.view-home .home-flashsale.fxf .bbx-fl-card.fxf-in .fs-discount{animation:fxf-pop .7s .55s cubic-bezier(.3,1.6,.5,1) both}
@keyframes fxf-pop{0%{transform:scale(0) rotate(-30deg)}100%{transform:scale(1) rotate(0)}}

/* ánh lướt qua ảnh khi rê chuột */
body.bb-xmas.view-home .home-flashsale.fxf .fs-photo{position:relative;overflow:hidden}
body.bb-xmas.view-home .home-flashsale.fxf .fs-photo::after{content:"";position:absolute;inset:0;background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.55) 50%,transparent 65%);transform:translateX(-130%);pointer-events:none}
body.bb-xmas.view-home .home-flashsale.fxf .bbx-fl-card:hover .bbx-fl-art::after{transform:translateX(130%);transition:transform .85s ease}

.bbx-fxf-canvas{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:9999}
/* thẻ lật vào và pháo hoa vẫn chạy khi máy bật giảm chuyển động (hiệu ứng ngắn, theo thao tác cuộn) */

/* ===== thẻ flashsale kiểu Maison Matcha ===== */
body.bb-xmas.view-home .home-flashsale.fxf .fs-products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;overflow:visible}@media(max-width:1100px){body.bb-xmas.view-home .home-flashsale.fxf .fs-products{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:780px){body.bb-xmas.view-home .home-flashsale.fxf .fs-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.bbx-fl-body{padding:12px 12px 14px}.bbx-fl-body h3{font-size:16px}.bbx-fl-price strong{font-size:22px}}
.bbx-fl-card{background:#fffdf8;color:#101f3b;border-radius:20px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 18px 40px rgba(0,0,0,.4),0 0 0 1px rgba(241,207,106,.4);transition:transform .2s ease,box-shadow .2s ease;text-align:left}
.bbx-fl-card:hover{transform:translateY(-6px)!important;box-shadow:0 24px 46px rgba(0,0,0,.5),0 0 0 1px rgba(241,207,106,.75),0 0 26px rgba(241,207,106,.25)}
.bbx-fl-art{position:relative;display:block;width:100%;padding:0;border:0;background:#efe6d3;aspect-ratio:4/5;cursor:pointer;overflow:hidden}
.bbx-fl-art img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease}
.bbx-fl-card:hover .bbx-fl-art img{transform:scale(1.06)}
.bbx-fl-art::after{content:"";position:absolute;inset:0;background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.55) 50%,transparent 65%);transform:translateX(-130%);pointer-events:none}
.bbx-fl-card:hover .bbx-fl-art::after{transform:translateX(130%);transition:transform .85s ease}
.bbx-fl-off{position:absolute;top:0;left:14px;padding:11px 9px 14px;background:#c2253a;color:#fff;font:800 18px/1 "Baloo 2",Inter,system-ui,sans-serif;clip-path:polygon(0 0,100% 0,100% 100%,50% 86%,0 100%);z-index:2}
.bbx-fl-body{display:flex;flex-direction:column;gap:8px;padding:16px 16px 18px;flex:1}
.bbx-fl-body h3{margin:0;font:700 19px/1.25 "Baloo 2",Inter,system-ui,sans-serif;color:#101f3b}
.bbx-fl-body h3 button{all:unset;cursor:pointer;color:inherit}
.bbx-fl-price{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.bbx-fl-price strong{font:800 28px/1 "Baloo 2",Inter,system-ui,sans-serif;color:#b32d22}
.bbx-fl-price s{font:600 15px/1 "Baloo 2",Inter,system-ui,sans-serif;color:#8a8ea1}
.bbx-fl-save{align-self:flex-start;padding:5px 12px;border-radius:999px;background:#f6dcd2;color:#7a2d17;font:700 13px/1 "Baloo 2",Inter,system-ui,sans-serif}
.bbx-fl-cta{margin-top:auto;border:0;cursor:pointer;text-align:center;border-radius:999px;padding:12px 14px;font:700 16px/1 "Baloo 2",Inter,system-ui,sans-serif;background:linear-gradient(180deg,#c2253a,#951a2b);color:#fff;box-shadow:0 6px 16px rgba(120,20,34,.35);transition:filter .2s}
.bbx-fl-cta:hover{filter:brightness(1.1)}
/* đầu khối: nhãn vàng, tiêu đề lớn, đồng hồ trong ngày */
.bbx-fl-kicker{margin:0 0 4px;font:700 13px/1 "Baloo 2",Inter,system-ui,sans-serif;letter-spacing:.22em;color:#f1cf6a}
body.bb-xmas.view-home .home-flashsale .fs-heading{display:flex;flex-wrap:wrap;gap:14px 30px;align-items:flex-end;justify-content:space-between}
body.bb-xmas.view-home .home-flashsale .fs-heading h2{font-family:"Baloo 2",Inter,system-ui,sans-serif!important;font-weight:800!important;font-size:clamp(30px,4vw,44px)!important}
.bbx-fl-timer small{display:block;margin-bottom:6px;color:#d9dfeb;font:600 12.5px/1 Inter,system-ui,sans-serif}
.bbx-fl-timer>div{display:flex;align-items:center;gap:6px}
.bbx-fl-timer b{display:inline-grid;place-items:center;min-width:48px;padding:8px 6px;border-radius:10px;background:linear-gradient(180deg,#fff3c4,#e2bb5c);color:#101f3b;font:800 25px/1 "Baloo 2",Inter,system-ui,sans-serif;font-variant-numeric:tabular-nums;box-shadow:0 6px 16px rgba(0,0,0,.35)}
.bbx-fl-timer span{margin:0 8px 0 0;font:600 12px/1 Inter,system-ui,sans-serif;color:#d9dfeb}
@media(max-width:560px){.bbx-fl-timer b{min-width:40px;font-size:20px}}
@media(prefers-reduced-motion: reduce) and (min-width: 99999px){.bbx-fl-card{transition:none}}
/* bỏ khối danh mục nhanh "Bạn muốn chọn bánh nào?" */
body.view-home .friendly-shortcuts{display:none!important}body.view-home .bbx-countdown + .bbx-divider{display:none}

/* nút đỏ thống nhất toàn trang chủ (theo nút "Săn deal ngay") */
body.bb-xmas.view-home .bbx-cta,body.bb-xmas.view-home .bbx-frame .bbx-cta,body.bb-xmas.view-home .bbx-story-card .bbx-cta,body.view-home .bbx-sc-buy,body.view-home .bbx-fl-cta{display:inline-flex!important;align-items:center;justify-content:center;gap:10px;padding:13px 28px!important;border:0!important;border-radius:999px!important;background:linear-gradient(180deg,#c2253a,#951a2b)!important;color:#fff!important;font:700 16px/1 "Baloo 2",Inter,system-ui,sans-serif!important;letter-spacing:.01em!important;text-decoration:none;text-shadow:none!important;box-shadow:0 6px 16px rgba(120,20,34,.35)!important;transition:filter .2s,transform .2s}
body.bb-xmas.view-home .bbx-cta:hover,body.bb-xmas.view-home .bbx-frame .bbx-cta:hover,body.bb-xmas.view-home .bbx-story-card .bbx-cta:hover,body.view-home .bbx-sc-buy:hover,body.view-home .bbx-fl-cta:hover{background:linear-gradient(180deg,#c2253a,#951a2b)!important;filter:brightness(1.12);transform:translateY(-2px);box-shadow:0 10px 22px rgba(120,20,34,.45)!important}
body.view-home .bbx-fl-cta{display:flex!important;width:100%}

/* thanh tìm kiếm gọn: bỏ trang trí sao và mascot đè, thanh mảnh, nền navy trong mờ viền vàng */
body.view-home .friendly-search.bb-global-search,body.bb-xmas .friendly-search.bb-global-search{max-width:760px;margin:10px auto 8px!important;padding:0!important}
body.bb-xmas .friendly-search::before,body.bb-xmas .friendly-search::after,body.bb-xmas .friendly-search-control::before,body.bb-xmas .friendly-search-control::after{display:none!important;content:none!important}
.friendly-search-mascot{display:none!important}
.friendly-search .friendly-search-control{display:block;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
body.version-4.view-home .friendly-search .search-form,body.version-4.view-home .friendly-search .friendly-search-control .search-form{height:46px!important;min-height:0!important;border-radius:999px!important;background:rgba(10,22,48,.62)!important;border:1px solid rgba(232,194,122,.65)!important;box-shadow:0 6px 20px rgba(2,8,20,.35)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:0 6px 0 20px!important}
body.version-4.view-home .friendly-search .search-form input{background:transparent!important;border:0!important;color:#fff4df!important;font:500 15px/1 Inter,system-ui,sans-serif!important;box-shadow:none!important}
body.version-4.view-home .friendly-search .search-form input::placeholder{color:rgba(255,244,223,.65)!important}
body.version-4.view-home .friendly-search .search-form button{width:36px!important;height:36px!important;border-radius:50%!important;background:linear-gradient(180deg,#c2253a,#951a2b)!important;color:#fff!important;border:0!important;box-shadow:none!important}
body.version-4.view-home .friendly-search .search-form.main{display:flex!important;align-items:center!important;overflow:hidden!important;padding:0 5px 0 20px!important;box-sizing:border-box!important}
body.version-4.view-home .friendly-search .search-form.main input{flex:1 1 auto;min-width:0;height:100%!important;padding:0!important}
body.version-4.view-home .friendly-search .search-form.main button{flex:0 0 36px!important;width:36px!important;height:36px!important;min-width:36px!important;margin:0!important;padding:0!important;position:static!important;border-radius:50%!important}
body.version-4.view-home .friendly-search .search-form.main button svg,body.version-4.view-home .friendly-search .search-form.main button i{width:16px!important;height:16px!important;font-size:16px!important}
body.version-4.view-home .friendly-search .search-form.main button,body.version-4.view-home .friendly-search .search-form.main>button{height:36px!important;max-height:36px!important;min-height:36px!important;align-self:center!important;line-height:1!important;inset:auto!important;transform:none!important}

/* hiệu năng: bỏ làm mờ nền (backdrop-filter) trên khối lớn, chỉ để nền đặc; cô lập vùng vẽ của khối */
body.bb-xmas.view-home .home-flashsale,body.bb-xmas.view-home .bbx-countdown,body.view-home .friendly-search .search-form,body.view-home .friendly-search .search-form.main{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
body.view-home .friendly-search .search-form.main{background:#0f2147!important}
body.view-home .home-flashsale.fxf .fs-products{contain:layout paint}
.bbx-fl-card{contain:layout paint;transform:translateZ(0)}
.bbx-fl-art img{will-change:auto}
/* ===== Thẻ Flashsale: không để thẻ kẹt ở trạng thái ẩn ===== */
@media (prefers-reduced-motion: reduce) and (min-width: 99999px){
  body.bb-xmas.view-home .home-flashsale.fxf .bbx-fl-card.fxf-in{animation:fxf-flip .95s cubic-bezier(.2,.9,.25,1.12) forwards!important}
  body.bb-xmas.view-home .home-flashsale.fxf .bbx-fl-card.fxf-in .fs-discount{animation:fxf-pop .7s .55s cubic-bezier(.3,1.6,.5,1) both!important}
}
