/* HalalShopBD — shared components: header, footer, product card, accordion, slider, toast, checkout popup */

/* announcement bar */
.announce { background: var(--grad-dark); color: #fff; font-size: .82rem; }
.announce-in { display: flex; align-items: center; justify-content: center; gap: 4px 10px; flex-wrap: wrap; padding-block: 5px; padding-right: 40px; position: relative; text-align: center; line-height: 1.5; }
.announce-tag { padding: 0 8px; border-radius: var(--r-pill); background: var(--grad-cta); font-weight: 700; font-size: .72rem; }
.announce b { color: #ffd166; }
.announce-cd { font-variant-numeric: tabular-nums; }
.announce a { display: none; align-items: center; gap: 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.announce-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; color: #fff; opacity: .8; border-radius: 8px; }
.announce-x:hover { opacity: 1; background: rgba(255, 255, 255, .12); }

/* header */
/* #site-header (the JS mount point) is only as tall as the bar + header, which made the sticky header scroll away with it.
   display: contents removes that box, so the header sticks to the top of the whole page. */
#site-header { display: contents; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(46, 16, 101, .07); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.12rem; color: var(--ink); letter-spacing: -.01em; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(109, 40, 217, .3); transition: transform .3s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-mark .ic { width: 18px; height: 18px; }
.logo-text b { color: var(--p-600); }
.nav { display: none; align-items: center; gap: 2px; }
.nav a { position: relative; padding: 6px 10px; border-radius: 10px; font-weight: 500; font-size: .92rem; color: var(--body); transition: color .2s, background .2s; white-space: nowrap; }
.nav a:hover { color: var(--p-600); background: var(--p-50); }
.nav a.active { color: var(--p-700); background: var(--p-100); font-weight: 600; }
.header-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--p-100); color: var(--p-700); transition: transform .15s; }
.nav-toggle:active { transform: scale(.92); }
.nav-toggle .ic { width: 21px; height: 21px; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; transition: visibility 0s .3s; }
.drawer.open { visibility: visible; transition: none; }
.drawer-bg { position: absolute; inset: 0; background: rgba(30, 10, 69, .5); opacity: 0; transition: opacity .3s; }
.drawer.open .drawer-bg { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(300px, 84vw); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 12px; transform: translateX(100%); transition: transform .3s var(--ease); overflow-y: auto; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.drawer-nav a { padding: 10px 12px; border-radius: 10px; font-weight: 500; color: var(--ink); }
.drawer-nav a.active, .drawer-nav a:hover { background: var(--p-100); color: var(--p-700); }

/* inner page hero (compact) */
.page-hero { background: var(--grad-dark); color: rgba(255, 255, 255, .85); padding-block: var(--hero-pt) var(--hero-pb); text-align: center; }
.page-hero h1 { color: #fff; font-size: clamp(1.35rem, 3.4vw, 1.95rem); }
.page-hero p { max-width: 620px; margin: 4px auto 0; font-size: .95rem; }
.crumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; font-size: .8rem; color: rgba(255, 255, 255, .7); }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span::before { content: '/'; margin-right: 6px; opacity: .6; }

/* ---------- product cover: always square (1:1) ---------- */
.cover { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; width: 100%; overflow: hidden; border-radius: var(--r); color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); isolation: isolate; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .5s var(--ease); }
.cover::before, .cover::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .13); z-index: -1; transition: transform .6s var(--ease); }
.cover::before { width: 70%; aspect-ratio: 1; right: -22%; top: -24%; }
.cover::after { width: 50%; aspect-ratio: 1; left: -14%; bottom: -16%; }
.cover-ic { display: grid; place-items: center; width: 32%; max-width: 84px; aspect-ratio: 1; border-radius: 26%; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(4px); transition: transform .4s var(--ease); }
.cover-ic .ic { width: 46%; height: 46%; }
.cover-fmt { position: absolute; left: 8px; bottom: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .26); font-size: .7rem; font-weight: 500; }
.cover-badge { position: absolute; left: 8px; top: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: #fff; color: #4c1d95; font-size: .7rem; font-weight: 700; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.cover-off { position: absolute; right: 8px; top: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--grad-cta); background-size: 200% 100%; font-size: .74rem; font-weight: 700; box-shadow: 0 3px 8px rgba(255, 94, 58, .35); }
.cover-big { align-content: center; gap: 10px; padding: 18px; border-radius: var(--r-lg); text-align: center; }
.cover-big .cover-ic { width: 30%; }
.cover-title { max-width: 90%; font-size: clamp(1.05rem, 2.6vw, 1.45rem); line-height: 1.3; text-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.cover-wide { aspect-ratio: 16 / 10; } /* blog posts only — products are always square */

/* ---------- product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px; box-shadow: var(--sh-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s, opacity .55s var(--ease); }
.pcard-media { display: block; border-radius: 12px; overflow: hidden; }
.pcard-media .cover { border-radius: 12px; }
.pcard-body { display: flex; flex-direction: column; gap: 5px; flex: 1; padding: 8px 4px 3px; }
.pcard-title { font-size: .93rem; line-height: 1.42; min-height: 2.84em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a { transition: color .2s; }
.pcard-title a:hover { color: var(--p-600); }
.pcard-rating { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.pcard-rating .star { color: var(--star); font-size: .95rem; line-height: 1; }
.pcard-rating b { color: var(--ink); }
.join { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; max-width: 100%; padding: 2px 8px; border-radius: 8px; background: var(--ok-bg); color: var(--ok-tx); font-size: .76rem; line-height: 1.4; }
.join .ic { width: 13px; height: 13px; flex: none; }
.join b { font-weight: 700; }
.pcard-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin-top: auto; padding-top: 3px; }
.pcard-price .price-now { font-size: 1.08rem; }
.pcard-price del { font-size: .78rem; }
/* card info row under the image: [users] 3,200 | ★ 4.9 (250) — centred, items close together */
.pcard-stats { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 8px; min-width: 0; overflow: hidden; font-size: .78rem; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.pcard-stats > * { flex: none; }
/* student count: green number on a soft green pill */
.ps-join { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: var(--r-pill); background: var(--ok-bg); color: var(--ok-tx); }
.ps-join .ic { display: inline-block; width: 14px; height: 14px; flex: none; color: inherit; }
.ps-join b { font-weight: 700; color: inherit; }
/* neutral grey divider */
.ps-sep { display: inline-block; width: 1px; height: 14px; background: rgba(128, 128, 140, .45); }
/* rating: orange star + number (matches the order button), lighter review count */
.ps-rate { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 3px; }
.ps-rate .star { color: var(--cta-1); font-size: 1.05em; line-height: 1; }
.ps-rate b { font-weight: 700; color: var(--orange-tx); }
.ps-rate > span:last-child { color: var(--muted); font-weight: 500; }
.btn-buy { margin-top: 4px; }
@media (hover: hover) {
  .pcard:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--p-200); }
  .pcard:hover .cover-ic { transform: scale(1.08) rotate(-5deg); }
  .pcard:hover .cover::before { transform: translate(-6%, 6%) scale(1.06); }
  .pcard:hover .cover img { transform: scale(1.05); }
}

/* category chip + card */
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 4px 14px 4px 4px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .86rem; color: var(--ink); box-shadow: var(--sh-sm); transition: transform .25s var(--ease), border-color .2s, box-shadow .25s, color .2s; }
.cat-chip .ibox { width: 28px; height: 28px; border-radius: 50%; box-shadow: none; }
.cat-chip .ibox .ic { width: 14px; height: 14px; }
.cat-chip:hover { transform: translateY(-2px); border-color: var(--p-400); color: var(--p-700); box-shadow: var(--sh); }
.cat-chip:active { transform: scale(.97); }
.cat-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, opacity .55s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--p-200); }
.cat-card > span:nth-child(2) { flex: 1; min-width: 0; }
.cat-card strong { display: block; color: var(--ink); line-height: 1.4; font-size: .95rem; }
.cat-card small { color: var(--muted); font-size: .8rem; }
.cat-arrow { color: var(--p-400); transition: transform .25s var(--ease); }
.cat-card:hover .cat-arrow { transform: translateX(4px); color: var(--p-600); }

/* feature / trust cards — compact: icon left, text right */
.feature, .trust-card { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--sh-sm); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, opacity .55s; }
.feature .ibox, .trust-card .ibox { grid-row: span 2; }
.feature:hover, .trust-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--p-200); }
.feature h3, .trust-card strong { display: block; margin: 0 0 2px; color: var(--ink); font-size: .98rem; line-height: 1.4; }
.feature p, .trust-card p { font-size: .88rem; line-height: 1.55; }

/* review */
.review { height: 100%; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh-sm); }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.review blockquote { flex: 1; color: var(--ink); font-size: .93rem; line-height: 1.6; }
.review-user { display: flex; align-items: center; gap: 10px; }
.review-user strong { display: block; color: var(--ink); line-height: 1.3; font-size: .93rem; }
.review-user small { color: var(--muted); font-size: .8rem; }

/* accordion */
.acc { display: grid; gap: 8px; }
.acc-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s, box-shadow .25s; }
.acc-item.open { border-color: var(--p-200); box-shadow: var(--sh); }
.acc-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px; text-align: left; font-weight: 600; font-size: .95rem; color: var(--ink); transition: color .2s; }
.acc-q:hover { color: var(--p-700); }
.acc-q .ic { color: var(--p-500); transition: transform .3s var(--ease); }
.acc-item.open .acc-q .ic { transform: rotate(180deg); }
.acc-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.acc-item.open .acc-a { grid-template-rows: 1fr; }
.acc-a-in { overflow: hidden; }
.acc-a-in p { padding: 0 14px 12px; font-size: .93rem; }

/* slider (scroll-snap, swipe friendly) */
.slider { position: relative; }
.slider-track { position: relative; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 4px 10px; }
.slider-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 86%; scroll-snap-align: start; min-width: 0; }
.slider-foot { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.slider-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--p-600); box-shadow: var(--sh-sm); transition: background .2s, color .2s, transform .2s var(--ease); }
.slider-btn:hover { background: #6d28d9; color: #fff; transform: scale(1.08); }
.slider-btn:active { transform: scale(.92); }
.slider-dots { display: flex; gap: 6px; }
.slider-dots button { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--p-200); transition: width .3s var(--ease), background .3s; }
.slider-dots button.on { width: 22px; background: var(--p-500); }

/* countdown */
.countdown { display: inline-flex; gap: 6px; }
.cd-box { display: grid; justify-items: center; min-width: 46px; padding: 4px 6px; border-radius: 10px; background: var(--p-100); color: var(--p-700); line-height: 1.2; }
.cd-box b { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.cd-box small { font-size: .66rem; font-weight: 500; }
.countdown--light .cd-box { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }

/* payment chips */
.pay-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-chips span { padding: 2px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: .8rem; font-weight: 600; }
.pay-chips--center { justify-content: center; margin-top: 18px; }

/* toast */
.toast-wrap { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; max-width: 440px; padding: 11px 15px; border-radius: 12px; background: var(--toast-bg); color: #fff; font-size: .9rem; line-height: 1.5; box-shadow: var(--sh-lg); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.toast.show { opacity: 1; transform: none; }
.toast .ic { margin-top: 2px; color: #6ee7a8; }
.toast-error .ic { color: #ff8fa3; }
.toast-info .ic { color: #c4b5fd; }

/* ---------- website chat bot (bottom right; replaces the floating WhatsApp button; WhatsApp + Messenger are inside) ---------- */
.cb-fab { position: fixed; right: 14px; bottom: 14px; z-index: 44; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px; border-radius: var(--r-pill); background: linear-gradient(135deg, #7c3aed, #4338ca); color: #fff; font-weight: 600; font-size: .88rem; box-shadow: 0 10px 26px rgba(76, 29, 149, .42); transition: transform .25s var(--ease), box-shadow .25s; animation: cb-in .5s var(--ease) .5s both; -webkit-tap-highlight-color: transparent; }
.cb-fab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: cb-ring 2.6s infinite; pointer-events: none; }
.cb-fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 30px rgba(76, 29, 149, .5); }
.cb-fab:active { transform: scale(.95); }
.cb-fab .ic { width: 22px; height: 22px; }
.cb-fab .ic-close, .cb.open .cb-fab .ic-open, .cb.open .cb-fab .cb-fab-t { display: none; }
.cb.open .cb-fab .ic-close { display: block; }
.cb-fab-t { display: none; }
.cb-dot { position: absolute; top: 3px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: #ff5e3a; box-shadow: 0 0 0 2px #fff; }
.cb-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: cb-ping 1.6s infinite; }
.cb.seen .cb-dot { display: none; }
.has-buybar .cb-fab { bottom: 76px; }
.cb-panel { position: fixed; right: 14px; bottom: 74px; z-index: 55; width: 360px; max-width: calc(100vw - 20px); height: min(540px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-lg); overflow: hidden; transform-origin: bottom right; animation: cb-pop .32s var(--ease); }
.cb-panel[hidden] { display: none; }
.has-buybar .cb-panel { bottom: 136px; height: min(520px, calc(100vh - 160px)); }
.cb-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: linear-gradient(135deg, #2e1065, #6d28d9); color: #fff; }
.cb-av { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; flex: none; }
.cb-av .ic { width: 19px; height: 19px; }
.cb-head b { display: block; font-size: .95rem; line-height: 1.3; }
.cb-head small { display: flex; align-items: center; gap: 5px; font-size: .74rem; opacity: .85; }
.cb-head small i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 2px rgba(74, 222, 128, .3); }
.cb-x { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: background .2s; }
.cb-x:hover { background: rgba(255, 255, 255, .15); }
.cb-x .ic { width: 18px; height: 18px; }
.cb-direct { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--p-50); font-size: .76rem; color: var(--muted); }
.cb-direct .cb-contact { margin-left: auto; }
.cb-contact { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-contact a { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: var(--r-pill); color: #fff; font-weight: 600; font-size: .8rem; transition: transform .2s var(--ease), filter .2s; }
.cb-contact a:hover { transform: translateY(-1px); filter: brightness(1.08); }
.cb-contact .ic { width: 15px; height: 15px; }
.ic-fill { fill: currentColor; stroke: none; }
.cb-wa { background: var(--wa); }
.cb-ms { background: linear-gradient(135deg, #0099ff, #a033ff 60%, #ff5280); }
.cb-body { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 7px; background: var(--bg); overscroll-behavior: contain; }
.cb-msg { max-width: 86%; padding: 7px 11px; border-radius: 14px; font-size: .88rem; line-height: 1.55; word-wrap: break-word; animation: cb-msg .3s var(--ease) both; }
.cb-msg.b { align-self: flex-start; background: var(--surface); color: var(--body); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cb-msg.u { align-self: flex-end; background: linear-gradient(135deg, #7c3aed, #4338ca); color: #fff; border-bottom-right-radius: 4px; }
.cb-msg ol { margin: 4px 0; padding-left: 18px; }
.cb-msg .cb-contact { margin-top: 7px; }
.cb-pcs { display: grid; gap: 5px; margin: 6px 0; }
.cb-pc { display: flex; align-items: center; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--body); transition: border-color .2s, transform .2s var(--ease); }
.cb-pc:hover { border-color: #7c3aed; transform: translateX(2px); }
.cb-pi { width: 38px; height: 38px; border-radius: 8px; color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; overflow: hidden; }
.cb-pi img { width: 100%; height: 100%; object-fit: cover; }
.cb-pc b { display: block; font-size: .84rem; color: var(--ink); line-height: 1.3; }
.cb-pc small { font-size: .78rem; color: var(--p-600); font-weight: 700; }
.cb-pc s { color: var(--muted); font-weight: 400; }
.cb-link { display: inline-block; margin-top: 2px; font-weight: 600; color: var(--p-600); }
.cb-typing { display: flex; gap: 4px; padding: 11px 12px; }
.cb-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: cb-dots 1s infinite; }
.cb-typing i:nth-child(2) { animation-delay: .15s; } .cb-typing i:nth-child(3) { animation-delay: .3s; }
.cb-quick { display: flex; gap: 5px; overflow-x: auto; padding: 7px 10px 1px; background: var(--surface); border-top: 1px solid var(--line); scrollbar-width: none; }
.cb-quick::-webkit-scrollbar { display: none; }
.cb-quick button { flex: none; height: 28px; padding: 0 11px; border-radius: var(--r-pill); border: 1px solid var(--p-200); background: var(--p-50); color: var(--p-600); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.cb-quick button:hover { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.cb-form { display: flex; gap: 6px; padding: 7px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); }
.cb-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--input-bg, var(--surface)); color: var(--ink); font: inherit; font-size: .9rem; outline: 0; transition: border-color .2s, box-shadow .2s; }
.cb-form input:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .18); }
.cb-form button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #ff9a2e, #ff5e3a); color: #fff; display: grid; place-items: center; flex: none; cursor: pointer; transition: transform .2s var(--ease); }
.cb-form button:active { transform: scale(.9); }
.cb-form button .ic { width: 18px; height: 18px; }
@media (min-width: 560px) { .cb-fab { padding: 0 16px 0 14px; } .cb-fab-t { display: inline; } }
@media (max-width: 559px) {
  .cb-panel, .has-buybar .cb-panel { inset: 0; width: auto; max-width: none; height: auto; border: 0; border-radius: 0; }
  .cb.open .cb-fab { display: none; }
  .cb-open-lock body { overflow: hidden; }
  .cb-head { padding-top: calc(10px + env(safe-area-inset-top)); }
}
.cb-tip { position: fixed; right: 14px; bottom: 74px; z-index: 44; max-width: min(250px, calc(100vw - 28px)); padding: 9px 30px 9px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; box-shadow: var(--sh-lg); font-size: .86rem; font-weight: 600; line-height: 1.45; cursor: pointer; animation: cb-tip-in .45s var(--ease) both; transform-origin: bottom right; }
.cb-tip[hidden], .cb.open .cb-tip { display: none; }
.cb-tip::after { content: ""; position: absolute; right: 18px; bottom: -6px; width: 12px; height: 12px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.cb-tip.swap .cb-tip-t { display: inline-block; animation: cb-tip-txt .4s var(--ease) both; }
.cb-tip-x { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.cb-tip-x:hover { background: var(--p-50); color: var(--ink); }
.cb-tip-x .ic { width: 12px; height: 12px; }
.has-buybar .cb-tip { bottom: 136px; }
@keyframes cb-tip-in { from { opacity: 0; transform: translateY(10px) scale(.9); } }
@keyframes cb-tip-txt { from { opacity: 0; transform: translateY(6px); } }
@keyframes cb-in { from { opacity: 0; transform: translateY(20px) scale(.8); } }
@keyframes cb-pop { from { opacity: 0; transform: translateY(14px) scale(.9); } }
@keyframes cb-msg { from { opacity: 0; transform: translateY(6px); } }
@keyframes cb-dots { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes cb-ping { to { transform: scale(2.4); opacity: 0; } }
@keyframes cb-ring { 0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, .45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(124, 58, 237, 0); } }
@media (prefers-reduced-motion: reduce) { .cb-fab, .cb-fab::before, .cb-panel, .cb-msg, .cb-dot::after, .cb-typing i, .cb-tip, .cb-tip.swap .cb-tip-t { animation: none; } }

/* floating WhatsApp (no longer rendered: replaced by the chat bot above; rules kept for reference) */
.wa-float { position: fixed; right: 14px; bottom: 14px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: var(--r-pill); background: var(--wa); color: #fff; font-weight: 600; font-size: .88rem; box-shadow: 0 8px 22px rgba(31, 168, 85, .4); transition: transform .25s var(--ease), box-shadow .25s; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 28px rgba(31, 168, 85, .5); }
.wa-float:active { transform: scale(.95); }
.wa-float .ic { width: 22px; height: 22px; }
.wa-float span { display: none; }
.has-buybar .wa-float { bottom: 76px; }

/* footer */
.site-footer { background: var(--footer-bg); color: rgba(255, 255, 255, .72); padding-top: 26px; font-size: .9rem; }
.site-footer .logo { color: #fff; }
.site-footer .logo-text b { color: var(--p-400); }
.footer-grid { display: grid; gap: 18px; }
.footer-about p { margin: 10px 0 12px; max-width: 340px; }
.site-footer .pay-chips span { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #fff; }
.site-footer h4 { color: #fff; font-size: .98rem; margin-bottom: 8px; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: flex-start; gap: 8px; }
.footer-contact .ic { margin-top: 4px; color: var(--p-400); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 18px; padding-block: 12px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.has-buybar .site-footer { padding-bottom: 68px; }

/* ---------- checkout popup ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30, 10, 69, .62); backdrop-filter: blur(4px); animation: fade .25s; }
.modal-dialog { position: relative; width: 100%; max-width: 900px; max-height: 94dvh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--sh-lg); animation: sheet .35s var(--ease); overscroll-behavior: contain; }
.modal-x { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); border: 1px solid var(--line); transition: background .2s, transform .2s var(--ease); }
.modal-x:hover { background: var(--p-100); transform: rotate(90deg); }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.co-grid { display: grid; }
.co-summary { padding: 16px 16px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
.co-summary h3 { margin-bottom: 10px; font-size: .98rem; }
.co-item { display: flex; align-items: center; gap: 12px; }
.co-item .cover { width: 68px; flex: none; border-radius: 10px; }
.co-item .cover-ic { border-radius: 10px; }
.co-item .cover-fmt { display: none; }
.co-item strong { display: block; color: var(--ink); line-height: 1.4; font-size: .95rem; }
.co-item small { color: var(--muted); font-size: .8rem; }
.co-rows { margin-top: 12px; display: grid; gap: 4px; font-size: .9rem; }
.co-rows > div { display: flex; justify-content: space-between; gap: 12px; }
.co-save { color: var(--ok); font-weight: 600; }
.co-total { margin-top: 4px; padding-top: 8px; border-top: 1.5px dashed var(--p-200); font-size: 1.08rem; font-weight: 700; color: var(--ink); }
.co-total span:last-child { color: var(--p-600); }
.co-trust { display: none; margin-top: 14px; gap: 6px; font-size: .84rem; }
.co-trust li { display: flex; align-items: flex-start; gap: 8px; }
.co-trust .ic { margin-top: 3px; color: var(--p-500); }
.co-form { padding: 16px 16px 18px; }
.co-form h2 { font-size: 1.2rem; }
.co-sub { margin: 0 0 12px; font-size: .88rem; color: var(--muted); }
.pay legend { margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pay-opt { position: relative; cursor: pointer; }
.pay-opt input { position: absolute; opacity: 0; inset: 0; }
.pay-opt span { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-weight: 600; font-size: .92rem; color: var(--ink); transition: border-color .2s, background .2s, box-shadow .2s, transform .15s; }
.pay-opt:active span { transform: scale(.97); }
.pay-opt i { width: 11px; height: 11px; border-radius: 50%; background: var(--pc); flex: none; }
.pay-opt input:checked + span { border-color: var(--p-500); background: var(--p-50); box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); }
.pay-opt input:focus-visible + span { outline: 3px solid var(--p-400); outline-offset: 2px; }
.bump { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 12px; border: 2px dashed var(--warn-bd); border-radius: var(--r); background: var(--warn-bg); cursor: pointer; transition: background .2s, border-color .2s; }
.bump:has(input:checked) { background: var(--warn-bg2); border-color: var(--cta-2); }
.bump input { width: 19px; height: 19px; margin: 3px 0 0; flex: none; accent-color: var(--cta-2); }
.bump-body { display: grid; gap: 1px; }
.bump-tag { font-size: .72rem; font-weight: 700; color: var(--orange-tx); }
.bump strong { color: var(--ink); line-height: 1.4; font-size: .93rem; }
.bump small { color: var(--body); line-height: 1.45; font-size: .82rem; }
.bump-price { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.bump-price b { color: var(--orange-tx); }
.co-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: .8rem; color: var(--muted); text-align: center; }
.co-secure .ic { color: var(--ok); }

@media (min-width: 560px) {
  .announce a { display: inline-flex; }
  .toast-wrap { left: auto; right: 20px; bottom: 20px; justify-items: end; }
  .slide { flex-basis: calc(50% - 6px); }
  .pcard { padding: 8px; }
  .pcard-body { padding: 8px 5px 3px; gap: 6px; }
  .pcard-title { font-size: .98rem; }
  .pcard-rating, .join { font-size: .8rem; }
  .pcard-stats { font-size: .82rem; gap: 10px; }
  .pcard-price .price-now { font-size: 1.15rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .modal { align-items: center; padding: 20px; }
  .modal-dialog { border-radius: 20px; max-height: 92dvh; }
  .co-grid { grid-template-columns: 1.15fr .85fr; }
  .co-summary { order: 2; padding: 24px 22px; border-bottom: 0; border-left: 1px solid var(--line); border-radius: 0 20px 20px 0; }
  .co-trust { display: grid; }
  .co-form { padding: 24px 24px; }
  .wa-float span { display: inline; }
}
@media (min-width: 1000px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .slide { flex-basis: calc(33.333% - 8px); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1.1fr 1.3fr; gap: 32px; }
  .footer-about { grid-column: auto; }
}
@media (min-width: 1100px) {
  .nav { display: flex; }
}
/* ---------- Header row 1: auth slot (login/register or profile) ---------- */
.header-cta { position: relative; }
.hdr-auth { display: flex; align-items: center; gap: 6px; }
.hdr-login { min-height: 36px; padding: 5px 12px; gap: 5px; border-radius: var(--r-pill); }
.hdr-login .ic { width: 15px; height: 15px; }

/* theme switch: pill track + sliding knob (sun in light, moon in dark) */
.theme-toggle { position: relative; flex: none; width: 50px; height: 28px; border-radius: var(--r-pill); background: var(--p-100); border: 1px solid var(--p-200); transition: background .3s, border-color .3s, box-shadow .2s; }
.theme-toggle:hover { box-shadow: 0 0 0 4px rgba(124, 58, 237, .12); }
.tt-knob { position: absolute; top: 3px; left: 3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #f59e0b; box-shadow: 0 2px 6px rgba(46, 16, 101, .25); transition: transform .35s var(--ease), background .3s, color .3s; }
.tt-knob .ic { grid-area: 1 / 1; width: 13px; height: 13px; transition: opacity .25s, transform .35s var(--ease); }
.tt-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="dark"] .theme-toggle { background: #261b4a; border-color: #4b3a85; }
[data-theme="dark"] .tt-knob { transform: translateX(22px); background: #120d25; color: #c4b5fd; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
[data-theme="dark"] .tt-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="dark"] .tt-moon { opacity: 1; transform: none; }
.prof { position: relative; }
.prof-btn { display: flex; align-items: center; gap: 6px; height: 40px; padding: 3px 8px 3px 3px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, box-shadow .2s, transform .15s; }
.prof-btn:hover, .prof-btn[aria-expanded="true"] { border-color: var(--p-200); box-shadow: var(--sh-sm); }
.prof-btn:active { transform: scale(.96); }
.prof-btn .avatar { width: 32px; height: 32px; font-size: .92rem; }
.prof-btn > .ic { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.prof-btn[aria-expanded="true"] > .ic { transform: rotate(180deg); }
.prof-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .86rem; color: var(--ink); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-md { width: 40px; height: 40px; }
/* phones: keep logo + switch + login/profile + menu on one row without clipping */
@media (max-width: 419px) {
  .header-cta { gap: 5px !important; }
  .theme-toggle { width: 44px; height: 26px; }
  .tt-knob { width: 18px; height: 18px; }
  [data-theme="dark"] .tt-knob { transform: translateX(18px); }
  .prof-btn { padding-right: 7px; gap: 5px; }
  .prof-btn > .ic { display: none; }
  .prof-name { max-width: 54px; }
  .hdr-login { padding-inline: 10px; }
}
@media (max-width: 379px) { .logo { font-size: 1rem; gap: 6px; } .logo-mark { width: 30px; height: 30px; } }
@media (max-width: 339px) { .prof-name, .hdr-login .ic { display: none; } }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 250px; max-width: calc(100vw - 20px); padding: 10px; display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg); animation: acct-in .18s var(--ease); }
.acct-menu[hidden] { display: none; }
@keyframes acct-in { from { opacity: 0; transform: translateY(-6px); } }
.acct-head { display: flex; align-items: center; gap: 10px; }
.acct-head > span:last-child { min-width: 0; }
.acct-head strong { display: block; color: var(--ink); font-size: .92rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-head small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-links { display: grid; border-top: 1px solid var(--line); padding-top: 4px; }
.acct-links a, .acct-links button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 6px; border-radius: 8px; font-size: .88rem; font-weight: 500; color: var(--ink); text-align: left; transition: background .15s, color .15s; }
.acct-links .ic { color: var(--p-500); width: 16px; height: 16px; }
.acct-links a:hover, .acct-links button:hover { background: var(--p-50); color: var(--p-700); }
.acct-links .acct-logout { margin-top: 2px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--err); }
.acct-links .acct-logout .ic { color: var(--err); }
.acct-links .acct-logout:hover { background: var(--err-bg); color: var(--err); }

/* ---------- Header row 2: site-wide search with animated placeholder ---------- */
.hdr-search-row { position: relative; padding-bottom: 8px; }
.hdr-search.search { z-index: 1; margin: 0 auto; max-width: 760px; padding: 3px 3px 3px 12px; border-radius: 12px; box-shadow: none; }
/* focus: the form lights up and a soft glow appears behind the search row only (no page overlay or blur) */
.hdr-search-row::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: 0; pointer-events: none; opacity: 0; background: radial-gradient(50% 90% at 50% 45%, rgba(124, 58, 237, .14), transparent 72%); transition: opacity .3s var(--ease); }
.hdr-search-row:focus-within::before { opacity: 1; }
.hdr-search.search:focus-within { border-color: var(--p-500); box-shadow: 0 0 0 4px rgba(124, 58, 237, .16), 0 8px 22px rgba(109, 40, 217, .16); }
[data-theme="dark"] .hdr-search-row::before { background: radial-gradient(50% 90% at 50% 45%, rgba(167, 139, 250, .16), transparent 72%); }
[data-theme="dark"] .hdr-search.search:focus-within { box-shadow: 0 0 0 4px rgba(167, 139, 250, .2), 0 8px 22px rgba(0, 0, 0, .4); }
/* suggestion list */
.hdr-search .search-suggest { padding: 6px; overscroll-behavior: contain; }
.sg-label { padding: 4px 8px 2px; font-size: .72rem !important; font-weight: 700; color: var(--muted) !important; }
.search-suggest a.on { background: var(--p-50); box-shadow: inset 0 0 0 1.5px var(--p-200); }
.sg-thumb { flex: none; overflow: hidden; }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sg-text { min-width: 0; }
.sg-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest .sg-text small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.search-suggest .sg-text small b { color: var(--p-600); }
.search-suggest mark { padding: 0 1px; border-radius: 3px; background: rgba(124, 58, 237, .16); color: var(--p-700); }
[data-theme="dark"] .search-suggest mark { background: rgba(167, 139, 250, .22); }
.sg-empty { display: flex; align-items: center; gap: 8px; padding: 12px 10px !important; color: var(--muted); }
.sg-empty .ic { color: var(--p-400); }
.sg-all { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 4px; padding: 8px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; font-size: .84rem; font-weight: 600; color: var(--p-600); transition: background .15s; }
.sg-all:hover { background: var(--p-50); }
.search-field { position: relative; flex: 1; min-width: 0; display: flex; }
.hdr-search .search-field input { height: 36px; font-size: .92rem; }
.hdr-search input::-webkit-search-cancel-button { cursor: pointer; }
.search-ph { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; pointer-events: none; color: var(--ph); font-size: .9rem; white-space: nowrap; }
.ph-text { display: block; overflow: hidden; text-overflow: ellipsis; transition: transform .35s var(--ease), opacity .35s var(--ease); }
.ph-text.out { transform: translateY(-110%); opacity: 0; }
.ph-text.in { transform: translateY(110%); opacity: 0; transition: none; }
.has-text .search-ph { display: none; }
.btn-search { min-height: 36px !important; padding-inline: 14px; gap: 5px; border-radius: 10px; }
.btn-search .ic { width: 15px; height: 15px; }
.hdr-search .search-suggest { max-height: 60vh; overflow-y: auto; }
@media (max-width: 379px) { .btn-search .ic { display: none; } .btn-search { padding-inline: 12px; } }
@media (max-width: 359px) {
  .logo { font-size: 1rem; gap: 6px; }
  .logo-mark { width: 30px; height: 30px; }
  .header-cta { gap: 4px; }
  .nav-toggle { width: 36px; height: 36px; }
}

/* ---------- Drawer: auth block ---------- */
.drawer-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-auth.is-user { display: block; }
.drawer-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); background: var(--p-50); }
.drawer-user > span:not(.avatar) { flex: 1; min-width: 0; }
.drawer-user strong { display: block; color: var(--ink); font-size: .92rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-user small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-logout { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px; color: var(--err); font-size: .82rem; font-weight: 600; }
.drawer-logout:hover { background: var(--err-bg); }

/* "আরও দেখুন" button under homepage product grids */
.more-row { display: flex; justify-content: center; margin-top: 12px; }
.btn-more { min-width: 200px; }

/* ---------- Mobile spacing (phones only; desktop unchanged) ---------- */
@media (max-width: 559px) {
  :root { --header-h: 52px; }
  .header-cta { gap: 6px; }
  .hdr-search-row { padding-bottom: 7px; }
  .product-grid { gap: 8px; }
  .pcard { padding: 5px; border-radius: 14px; }
  .pcard-media, .pcard-media .cover { border-radius: 10px; }
  .pcard-body { padding: 6px 2px 2px; gap: 4px; }
  .pcard-stats { gap: 6px; font-size: .74rem; }
  .ps-join { padding: 1px 6px 1px 5px; gap: 3px; }
  .ps-join .ic { width: 13px; height: 13px; }
  .more-row { margin-top: 10px; }
  .btn-more { width: 100%; }
  .site-footer { padding-top: 18px; }
  .footer-grid { gap: 14px; }
  .footer-about p { margin: 8px 0 10px; }
  .footer-bottom { margin-top: 14px; padding-block: 10px; }
}

/* ---------- Header layout ----------
   Desktop (≥1000px), one row at the same 1200px container as the page: logo → menu (3 items) → search (fills the rest, min 260px) → theme switch → লগইন/রেজিস্টার or profile. No hamburger.
   Below 1000px: logo + theme switch + (login button from 560px / profile) + hamburger, search on its own row underneath. */
@media (max-width: 999px) {
  .header-in { display: grid; grid-template-columns: auto 1fr auto; gap: 0; height: auto; }
  .header-in > .logo, .header-in > .header-cta { grid-row: 1; height: var(--header-h); }
  .header-in > .logo { grid-column: 1; justify-self: start; }
  .header-in > .header-cta { grid-column: 3; justify-self: end; padding-left: 12px; }
  .header-in > .nav { display: none; }
  .hdr-search-row { grid-row: 2; grid-column: 1 / -1; }
}
/* phones: compact লগইন/রেজিস্টার button between the theme switch and the hamburger */
@media (max-width: 559px) {
  .hdr-auth .hdr-login { min-height: 32px; padding: 4px 10px; gap: 4px; font-size: .78rem; }
  .hdr-auth .hdr-login .ic { width: 13px; height: 13px; }
}
.hl-short { display: none; }
@media (max-width: 559px) { .hdr-auth .hl-full { display: none; } .hdr-auth .hl-short { display: inline; } .hdr-auth .hdr-login { white-space: nowrap; } } /* phones: [icon] লগইন; registration is linked from login.html */
@media (min-width: 420px) and (max-width: 559px) { .prof-name { max-width: 72px; } } /* long usernames end with … instead of pushing the hamburger off-screen */
@media (min-width: 1000px) {
  .header-in { gap: 14px; }
  .header-in > .logo, .nav, .header-cta { flex: none; }
  .nav { display: flex; }
  .hdr-search-row { flex: 1 1 auto; min-width: 260px; padding-bottom: 0; }
  .hdr-search-row::before { top: -10px; bottom: -10px; }
  .hdr-search.search { max-width: none; margin: 0; }
  .nav-toggle { display: none; }
}

/* ---------- Search mode: dark veil over everything below the header ----------
   The header (z-index 50) and its suggestion list stay above the veil (z-index 45); the top offer bar stays bright too. */
.search-veil { position: fixed; inset: 0; z-index: 45; background: rgba(6, 3, 16, .4); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s .25s; }
.search-on .search-veil { opacity: 1; visibility: visible; transition: opacity .25s var(--ease); }
.search-on body { overflow: hidden; padding-right: var(--sbw, 0px); }
.search-on .announce { position: relative; z-index: 46; }
[data-theme="dark"] .search-veil { background: rgba(0, 0, 0, .45); }


/* ---------- Sales notification (HS.sales): compact card, one at a time ----------
   Desktop ≥900px: bottom-left (18px / 20px), enters from the bottom-left. Below 900px: 8px under the sticky header (--sn-top, set in JS), right 8px, enters from the right. */
.sn { position: fixed; z-index: 44; display: flex; align-items: center; gap: 8px; width: 316px; max-width: calc(100vw - 16px); padding: 8px; background: var(--surface); color: var(--body); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-lg); overflow: hidden; left: 18px; bottom: 20px; opacity: 0; transform: translate(-14px, 14px); transition: opacity .42s var(--ease), transform .42s var(--ease); pointer-events: none; }
.sn.in { opacity: 1; transform: none; pointer-events: auto; }
.sn.out { opacity: 0; transform: translate(-14px, 10px); transition-duration: .3s; transition-timing-function: ease-in; }
.sn:hover { border-color: var(--p-200); box-shadow: 0 18px 44px rgba(46, 16, 101, .2); }
a.sn { cursor: pointer; }
.sn:focus-visible { outline: 3px solid var(--p-400); outline-offset: 2px; }
.sn-img { flex: none; width: 68px; height: 68px; overflow: hidden; border-radius: 8px; background: var(--p-50); }
.sn-img img { width: 100%; height: 100%; object-fit: cover; }
.sn-cover { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--g1, #8b5cf6), var(--g2, #6d28d9)); color: #fff; }
.sn-cover .ic { width: 26px; height: 26px; }
.sn-body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.sn-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sn-badge { flex: none; padding: 1px 7px; border-radius: 6px; background: var(--ok-bg); color: var(--ok-tx); font-size: .68rem; font-weight: 700; line-height: 1.5; }
.sn-time { overflow: hidden; color: var(--ok); font-size: .72rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.sn-name { overflow: hidden; color: var(--ink); font-size: .86rem; font-weight: 600; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
/* timing bar: full width at the very bottom, clipped by the card's corners; empties over --sn-dur (same value as the hide timer) */
.sn-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ok-bg); pointer-events: none; }
.sn-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #22c55e, var(--ok)); transform-origin: left center; transform: scaleX(1); }
.sn.in .sn-bar::after { animation: sn-bar var(--sn-dur, 4500ms) linear forwards; }
.sn.sn-paused .sn-bar::after { animation-play-state: paused; }
.sn.out .sn-bar::after { transform: scaleX(0); }
@keyframes sn-bar { to { transform: scaleX(0); } }
.sn-prod { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .76rem; line-height: 1.35; }
@media (max-width: 899px) {
  .sn { left: auto; right: 8px; bottom: auto; top: var(--sn-top, 112px); width: 282px; transform: translateX(calc(100% + 16px)); }
  .sn.out { transform: translateX(calc(100% + 16px)); }
  .sn-img { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .sn, .sn.out { transform: none !important; } .sn-bar { display: none; } }

/* ---------- product actions (cards + product page buy box): [অর্ডার করুন][basket] ⇄ [✓ চেকআউটে যান] ----------
   Both states share one grid cell and cross-fade, so the card height never jumps. .is-in = product is in the cart. */
.acts { display: grid; margin-top: 4px; }
.acts > * { grid-area: 1 / 1; min-width: 0; transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s; }
.acts-buy { display: flex; gap: 6px; }
.acts-buy .btn-buy { flex: 1; min-width: 0; margin-top: 0; }
.acts .btn-go, .acts.is-in .acts-buy { opacity: 0; visibility: hidden; transform: scale(.96); pointer-events: none; }
.acts.is-in .btn-go { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.btn-go { width: 100%; background: linear-gradient(110deg, #22c55e, #0f9d58); color: #fff; box-shadow: 0 4px 14px rgba(15, 157, 88, .3); }
.btn-go:hover { box-shadow: 0 8px 20px rgba(15, 157, 88, .4); }
.btn-go .ic { stroke-width: 2.4; }
.cart-add { flex: none; display: grid; place-items: center; width: 38px; min-height: 38px; padding: 0; border-radius: 10px; border: 1.5px solid var(--p-200); background: var(--p-50); color: var(--p-600); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.cart-add .ic { width: 18px; height: 18px; }
.cart-add:hover { background: var(--p-600); border-color: transparent; color: #fff; }
.cart-add:active { transform: scale(.9); }
.cart-add:focus-visible { outline: 3px solid var(--p-400); outline-offset: 2px; }
.acts-lg .acts-buy { gap: 8px; }
.acts-lg .cart-add { width: 52px; border-radius: 14px; }
.acts-lg .cart-add .ic { width: 22px; height: 22px; }
@media (max-width: 419px) { .acts-buy { gap: 5px; } .cart-add { width: 34px; min-height: 34px; } .cart-add .ic { width: 16px; height: 16px; } .acts-lg .cart-add { width: 48px; } .acts-lg .cart-add .ic { width: 20px; height: 20px; } }

/* ---------- floating basket: always visible, flush with the right edge, above the WhatsApp button ----------
   Mini (empty cart, .is-mini): [icon] | ৳0 / "0 প্রোডাক্ট". Expanded: [animated basket icon] | ৳total (largest, bold) /
   "2টি প্রোডাক্ট" (medium) / "কনফার্ম" or "FREE" | ↗. Mini ⇄ expanded = one-off width/height animation from JS (.fb-grow / .fb-shrink).
   Purple; green layer fades in when the free gift unlocks. Whole card → checkout. Loops are CSS keyframes only. */
.fb { position: fixed; top: 50%; right: 12px; transform: translateY(-50%); z-index: 43; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 10px; padding: 8px 10px 8px 9px; border-radius: 16px; color: #fff; background: linear-gradient(150deg, #8b5cf6, #6d28d9 60%, #4c1d95); box-shadow: -4px 8px 22px rgba(76, 29, 149, .35); transform-origin: right center; -webkit-tap-highlight-color: transparent; transition: box-shadow .6s; }
body[data-page="thank-you"] .fb { display: none !important; } /* safety net: core.js never mounts it on thank-you */
.fb > * { position: relative; z-index: 1; }
/* green layer (gradients cannot transition directly) */
.fb::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(150deg, #34d399, #0f9d58 60%, #0b7a44); opacity: 0; transition: opacity .6s ease; }
/* glow ring, green state only */
.fb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.fb.fb-grow, .fb.fb-shrink { overflow: hidden; } /* clip the content while the card resizes */
.fb:hover { box-shadow: -6px 10px 26px rgba(76, 29, 149, .45); }
.fb:active { scale: .97; }
.fb:focus-visible { outline: 3px solid var(--p-400); outline-offset: 2px; }
/* icon box: vertically centred in the full card height (grid align + auto margins), own loop animation */
.fb-ic { display: grid; place-items: center; align-self: center; margin-block: auto; transform-origin: 50% 50%; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .16); animation: fbFloat 2.6s ease-in-out infinite; }
.fb-ic .ic { width: 28px; height: 28px; }
.fb-info { display: grid; gap: 1px; line-height: 1.18; white-space: nowrap; }
.fb-t { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fb-n { font-size: 12.5px; font-weight: 500; opacity: .92; }
.fb-s { display: flex; align-items: center; height: 1.18em; font-size: 12px; font-weight: 600; } /* same height for কনফার্ম and gift + FREE */
.fb-s em { font-style: normal; }
.fb-free { display: none; align-items: center; gap: 3px; letter-spacing: .6px; }
.fb-free .ic { width: 12px; height: 12px; }
.fb-arrow { align-self: start; display: grid; place-items: center; margin-top: 1px; }
.fb-arrow .ic { width: 16px; height: 16px; animation: fbArrow 1.8s ease-in-out infinite; }
/* mini state (empty cart): smaller, icon + ৳0 + "0 প্রোডাক্ট" only, calm loop */
.fb.is-mini { grid-template-columns: auto auto; gap: 8px; padding: 6px 10px 6px 7px; border-radius: 14px; }
.fb.is-mini .fb-s, .fb.is-mini .fb-arrow { display: none; }
.fb.is-mini .fb-ic { width: 36px; height: 36px; border-radius: 10px; animation: fbFloatS 3.2s ease-in-out infinite; }
.fb.is-mini .fb-ic .ic { width: 22px; height: 22px; }
.fb.is-mini .fb-t { font-size: 14px; }
.fb.is-mini .fb-n { font-size: 11.5px; }
/* mini → expanded: confirm line + arrow fade in while the card grows */
.fb.fb-grow .fb-s, .fb.fb-grow .fb-arrow { animation: fbIn .4s .22s both; }
.fb.fb-grow .fb-ic .ic { animation: fbPop .6s var(--ease); }
/* free gift unlocked: green, livelier icon, soft glow */
.fb.is-free::before { opacity: 1; }
.fb.is-free { box-shadow: -4px 8px 22px rgba(11, 122, 68, .38); }
.fb.is-free::after { animation: fbGlow 2.2s ease-out infinite; }
.fb.is-free .fb-ok { display: none; }
.fb.is-free .fb-free { display: inline-flex; }
.fb.is-free .fb-ic { background: rgba(255, 255, 255, .2); animation: fbFloatG 2s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .5)); }
/* one-off pops on the svg (the box keeps looping): product landed / gift unlocked */
.fb.fb-bounce .fb-ic .ic { animation: fbPop .6s var(--ease); }
.fb.fb-unlock .fb-ic .ic { animation: fbUnlock .85s var(--ease); }
@keyframes fbFloatS { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.03); } }
@keyframes fbFloat { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-4px) scale(1.05); } 55%, 74% { transform: translateY(0) scale(1); } 82% { transform: translateY(-2px) scale(1.1); } 90% { transform: translateY(0) scale(.97); } }
@keyframes fbFloatG { 0%, 100% { transform: translateY(0) scale(1); } 22% { transform: translateY(-5px) scale(1.08) rotate(-4deg); } 42% { transform: translateY(0) scale(.95); } 54% { transform: translateY(-2px) scale(1.04) rotate(3deg); } 70% { transform: translateY(0) scale(1); } }
@keyframes fbPop { 0%, 100% { transform: none; } 35% { transform: translateY(-3px) scale(1.28); } 60% { transform: scale(.92); } 80% { transform: scale(1.06); } }
@keyframes fbUnlock { 0% { transform: scale(1); } 30% { transform: scale(1.4) rotate(-10deg); } 55% { transform: scale(.9) rotate(6deg); } 78% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes fbIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes fbArrow { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -2px); } }
@keyframes fbGlow { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 65%, 100% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } }
@media (max-width: 559px) {
  .fb { right: 8px; gap: 7px; padding: 6px 8px 6px 7px; border-radius: 14px; }
  .fb-ic { width: 38px; height: 38px; border-radius: 11px; }
  .fb-ic .ic { width: 24px; height: 24px; }
  .fb-t { font-size: 15px; }
  .fb-n { font-size: 11.5px; }
  .fb-s { font-size: 11px; }
  .fb-arrow .ic { width: 14px; height: 14px; }
  .fb.is-mini { gap: 7px; padding: 5px 9px 5px 6px; border-radius: 12px; }
  .fb.is-mini .fb-ic { width: 32px; height: 32px; border-radius: 9px; }
  .fb.is-mini .fb-ic .ic { width: 20px; height: 20px; }
  .fb.is-mini .fb-t { font-size: 13px; }
  .fb.is-mini .fb-n { font-size: 11px; }
}
/* thumbnail that flies from a product into the basket */
.fly { position: fixed; z-index: 210; pointer-events: none; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 26px rgba(46, 16, 101, .3); will-change: transform, opacity; }
.fly .cover { width: 100%; height: 100%; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .fb, .fb::after, .fb-ic, .fb-ic .ic, .fb-arrow .ic, .fb-s, .fb-arrow { animation: none !important; } .acts > * { transition: none; } }

/* ---------- exit-intent coupon popup (HS.exitIntent) ----------
   Reuses .modal / .modal-backdrop / .modal-x. Compact centred card (max 340px) on every screen, never a full-screen sheet.
   Gift icon, heading, purple sub line, one text line, dashed code box, orange copy button (.btn-cta), small hint.
   No taka amount. Open: scale + fade; close (also automatic after a successful copy): .closing. */
.modal.xp { align-items: center; padding: 16px; z-index: 110; }
.xp-dialog { position: relative; width: 100%; max-width: 340px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 18px 18px 14px; border-radius: 20px; text-align: center; background: var(--surface); box-shadow: var(--sh-lg); animation: xpIn .34s var(--ease); }
.modal.xp.closing .xp-dialog { animation: xpOut .22s ease forwards; }
.modal.xp.closing .modal-backdrop { animation: xpFade .22s ease forwards; }
.xp-x { top: 8px; right: 8px; width: 32px; height: 32px; background: var(--soft); }
.xp-gift { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 14px; color: #fff; background: var(--grad); box-shadow: 0 8px 18px rgba(109, 40, 217, .32); animation: xpGift 2.4s ease-in-out infinite; }
.xp-gift img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.xp-gift .ic { width: 24px; height: 24px; }
.xp-dialog h2 { margin: 0; font-size: 20px; line-height: 1.3; color: var(--ink); }
.xp-sub { margin: 2px 0 4px; font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--p-600); }
.xp-p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; color: var(--body); }
.xp-code { display: grid; gap: 0; margin: 0 0 10px; padding: 6px 10px; border: 2px dashed var(--p-400); border-radius: 12px; background: var(--p-50); }
.xp-code small { font-size: 11.5px; color: var(--muted); }
.xp-code strong { font-size: 24px; font-weight: 800; letter-spacing: 4px; line-height: 1.25; color: var(--p-600); font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.xp-copy { min-height: 46px; }
.xp-copy.is-done { background: linear-gradient(110deg, #22c55e, #0f9d58); }
.xp-err { margin: 8px 0 0; padding: 7px 9px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--err); background: var(--err-bg); }
.xp-err[hidden] { display: none; }
.xp-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
@keyframes xpIn { from { opacity: 0; transform: translateY(14px) scale(.93); } }
@keyframes xpOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes xpFade { to { opacity: 0; } }
@keyframes xpGift { 0%, 100% { transform: rotate(0) scale(1); } 15% { transform: rotate(-10deg) scale(1.08); } 30% { transform: rotate(8deg) scale(1.08); } 45% { transform: rotate(0) scale(1); } }
@media (max-width: 419px) {
  .xp-dialog { max-width: 320px; padding: 16px 14px 12px; border-radius: 18px; }
  .xp-gift { width: 42px; height: 42px; border-radius: 12px; }
  .xp-dialog h2 { font-size: 18px; }
  .xp-sub { font-size: 14px; }
  .xp-p { font-size: 13px; }
  .xp-code strong { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .xp-dialog, .xp-gift, .modal.xp.closing .xp-dialog, .modal.xp.closing .modal-backdrop { animation: none !important; } }

.cb-left .cb-fab, .cb-left .cb-tip { left: 14px; right: auto; }
@media (min-width: 560px) {
  .cb-left .cb-panel { left: 14px; right: auto; }
}
