/* =========================================================
   SITE CHROME — the one navbar + footer used on every page
   (partials/navbar.blade.php, partials/footer.blade.php) + live search dropdown.
   Self-contained: works with or without Bootstrap / site.css (e.g. /ai-world).
   ========================================================= */
.nv, .ft {
    --nv-primary: #4F46E5;
    --nv-primary-dark: #4338CA;
    --nv-ink: #14132B;
    --nv-text: #46455E;
    --nv-muted: #5B5A73;
    --nv-border: #ECECF3;
    --nv-soft: #F7F7FB;
    font-family: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
html[lang="bn"] .nv, html[lang="bn"] .ft { font-family: 'Hind Siliguri', 'Plus Jakarta Sans', system-ui, sans-serif; }
.nv *, .ft * { box-sizing: border-box; }
.nv a, .ft a { text-decoration: none; }
.nv button { font: inherit; cursor: pointer; }
.nv [hidden], .ft [hidden] { display: none !important; }
.nv-bn { font-family: 'Hind Siliguri', 'Plus Jakarta Sans', system-ui, sans-serif; }
.nv-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Same width as page content everywhere (site.css .container) */
.nv-container { width: 100%; max-width: 1680px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* ---------- Navbar ---------- */
.nv { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--nv-border); color: var(--nv-ink); }
.nv-bar { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.nv-brand { display: flex; align-items: center; gap: 10px; color: var(--nv-ink); flex: none; margin-right: 4px; }
.nv-brand:hover { color: var(--nv-ink); }
.nv-logo { height: 52px; width: auto; display: block; }
.nv-brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--nv-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-family: 'Hind Siliguri', sans-serif; font-size: 16px; }
.nv-brand-text { display: flex; flex-direction: column; }
.nv-brand-name { font-weight: 800; font-size: 16px; line-height: 1.15; }
.nv-brand-sub { font-size: 12px; color: var(--nv-muted); }

.nv-links { display: flex; align-items: center; gap: 2px; }
.nv-links a { font-size: 14px; font-weight: 500; color: var(--nv-text); padding: 10px 12px; border-radius: 10px; white-space: nowrap; }
.nv-links a:hover { color: var(--nv-ink); background: #F6F6FB; }
.nv-links a.active { color: var(--nv-ink); font-weight: 600; background: #F1F0FF; }

.nv-search { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 160px; max-width: 360px; margin-left: auto; }
.nv-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--nv-muted); font-size: 15px; pointer-events: none; }
.nv-search input { width: 100%; height: 42px; border: 1px solid #E4E3F1; border-radius: 999px; background: var(--nv-soft); padding: 0 16px 0 40px; font: inherit; font-size: 14px; color: var(--nv-ink); outline: none; -webkit-appearance: none; appearance: none; }
.nv-search input::placeholder { color: #8B8AA3; }
.nv-search input:focus { background: #fff; border-color: var(--nv-primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }

.nv-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nv-lang { display: inline-flex; background: #F1F1F6; border-radius: 10px; padding: 3px; }
.nv-lang a { border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--nv-muted); line-height: 1.3; }
.nv-lang a.active { background: #fff; color: var(--nv-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(20, 19, 43, .08); }
.nv-btn, .nv-btn-outline, .nv-link-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; font-size: 14px; font-weight: 700; white-space: nowrap; line-height: 1; }
.nv-btn { background: var(--nv-primary); color: #fff; border: 0; }
.nv-btn:hover, .nv-btn:focus { background: var(--nv-primary-dark); color: #fff; }
.nv-btn-outline { background: #fff; color: var(--nv-ink); border: 1px solid #D9D8EA; }
.nv-btn-outline:hover, .nv-btn-outline[aria-expanded="true"] { border-color: var(--nv-primary); color: var(--nv-primary); }
.nv-link-btn { color: var(--nv-ink); font-weight: 600; padding: 0 12px; }
.nv-link-btn:hover { color: var(--nv-primary); }
.nv-block { display: flex; width: 100%; }
.nv-icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--nv-text); font-size: 18px; }
.nv-icon-btn:hover { background: #F6F6FB; color: var(--nv-ink); }
.nv-icon-btn.is-active { color: #E11D48; }
.nv-badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #E11D48; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.nv-badge-inline { position: static; margin-left: 6px; }
.nv-caret { font-size: 11px; }

/* user dropdown */
.nv-dropdown { position: relative; }
.nv-menu-card { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--nv-border); border-radius: 14px; box-shadow: 0 18px 40px rgba(20, 19, 43, .14); padding: 6px; z-index: 1050; }
.nv-dropdown.is-open .nv-menu-card { display: block; }
.nv-menu-card a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--nv-ink); }
.nv-menu-card a:hover { background: #F6F6FB; color: var(--nv-primary); }
.nv-menu-card a i { color: var(--nv-muted); font-size: 16px; }
.nv-menu-card hr { border: 0; border-top: 1px solid var(--nv-border); margin: 6px 4px; opacity: 1; }

/* mobile controls */
.nv .nv-mobile { display: none; }
.nv-square-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #E4E3F1; background: #fff; color: var(--nv-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; padding: 0; }
.nv-square-btn:hover, .nv-square-btn[aria-expanded="true"] { border-color: var(--nv-primary); color: var(--nv-primary); }
.nv-burger { flex-direction: column; gap: 4px; }
.nv-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.nv-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nv-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nv-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nv-panel { border-top: 1px solid var(--nv-border); background: #fff; }
.nv-panel .nv-search { max-width: none; margin: 12px auto; }
.nv-panel .nv-search-icon { left: calc(1.5rem + 14px); }
.nv-menu-list { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; padding-bottom: 16px; max-height: calc(100vh - 80px); overflow-y: auto; }
.nv-menu-list .nv-lang { align-self: flex-start; margin-bottom: 8px; }
.nv-menu-link { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--nv-ink); }
.nv-menu-link:hover { background: #F6F6FB; color: var(--nv-primary); }
.nv-menu-link.active { background: #F1F0FF; font-weight: 700; }
.nv-menu-link i { color: var(--nv-muted); font-size: 17px; }
.nv-menu-sep { height: 1px; background: var(--nv-border); margin: 8px 0; }
.nv-menu-list .nv-btn { margin-top: 6px; height: 48px; }

/* ---------- Live search dropdown (site.js) ---------- */
.bal-search-results { display: none; position: absolute; top: calc(100% + 0.4rem); left: 0; right: 0; max-height: 380px; overflow-y: auto; background: #fff; border: 1px solid #ECECF3; border-radius: 14px; box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12); z-index: 1050; text-align: left; }
.bal-search-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; color: #14132B; text-decoration: none; border-bottom: 1px solid #ECECF3; }
.bal-search-item:last-child { border-bottom: none; }
.bal-search-item:hover { background-color: #F7F7FB; color: #14132B; }
.bal-search-item-thumb { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; object-fit: cover; flex-shrink: 0; background-color: #EEF2FF; }
.bal-search-item-thumb-placeholder { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; flex-shrink: 0; background-color: #EEF2FF; color: #4F46E5; display: flex; align-items: center; justify-content: center; }
.bal-search-item-title { flex: 1; font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-search-item-price { font-size: 0.78rem; font-weight: 700; color: #4F46E5; flex-shrink: 0; }
.bal-search-empty, .bal-search-loading { padding: 0.75rem; font-size: 0.85rem; color: #5B5A73; text-align: center; }

/* ---------- Footer ---------- */
.ft { background: #14132B; color: #DCDDF5; padding: 48px 0 32px; }
.ft-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; background: #4F46E5; border-radius: 24px; padding: 32px; margin-bottom: 48px; }
.ft-cta-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 4px; line-height: 1.3; }
.ft-cta-text { color: #E0E7FF; font-size: 15px; }
.ft-subscribe { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ft-subscribe input { width: 260px; max-width: 100%; min-width: 0; height: 48px; border: 0; border-radius: 12px; padding: 0 16px; font: inherit; font-size: 15px; color: #14132B; background: #fff; outline: none; }
.ft-subscribe input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, .35); }
.ft-btn-dark { display: inline-flex; align-items: center; justify-content: center; height: 48px; background: #14132B; color: #fff; font-weight: 700; border-radius: 12px; padding: 0 20px; font-size: 15px; border: 0; white-space: nowrap; cursor: pointer; font-family: inherit; }
.ft-btn-dark:hover, .ft-btn-dark:focus { background: #000; color: #fff; }
.ft-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; }
.ft-brand { font-weight: 800; color: #fff; font-size: 16px; margin-bottom: 8px; }
.ft-about p { font-size: 14px; color: #B9BAD6; line-height: 1.6; margin: 0 0 14px; max-width: 380px; }
.ft-social { display: flex; gap: 8px; margin-bottom: 14px; }
.ft-social a { width: 40px; height: 40px; border-radius: 12px; background: #25244A; color: #fff; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.ft-social a:hover { background: #4F46E5; color: #fff; }
.ft-phone { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #B9BAD6; }
.ft-phone:hover { color: #fff; }
.ft-links h6 { color: #fff; font-weight: 700; font-size: 15px; margin: 0 0 12px; font-family: inherit; line-height: 1.3; }
.ft-links a { color: #B9BAD6; font-size: 14px; display: block; margin-bottom: 10px; }
.ft-links a:hover { color: #fff; }
.ft-bottom { border-top: 1px solid #2C2B4A; font-size: 13px; color: #9C9DBD; padding-top: 24px; margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1399.98px) {
    .nv-links a { padding: 9px 9px; }
    .nv-search { max-width: 280px; }
}
@media (min-width: 1100px) and (max-width: 1199.98px) {
    .nv-bar { gap: 10px; }
    .nv-links a { padding: 8px 7px; font-size: 13.5px; }
    .nv-search { min-width: 130px; max-width: 200px; }
    .nv-brand-sub { display: none; }
}
/* < 1100px: compact bar (logo · search button · menu button), panels drop down */
@media (max-width: 1099.98px) {
    .nv-desktop, .nv-links { display: none !important; }
    .nv .nv-mobile { display: inline-flex; }
    .nv .nv-panel.nv-mobile { display: block; }
    .nv-actions { margin-left: auto; }
    .nv-bar { min-height: 68px; }
    .nv-logo { height: 46px; }
    .nv-brand-sub { display: block; }
}
@media (max-width: 991.98px) {
    /* No footer on mobile (site-wide). The body keeps room for the fixed tab bar instead. */
    .ft { display: none !important; }
    body { padding-bottom: calc(72px + 16px + env(safe-area-inset-bottom)); }
    .ft-grid { grid-template-columns: 1fr 1fr; }
    .ft-about { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .ft-cta { padding: 22px; border-radius: 20px; margin-bottom: 28px; }
    .ft-cta-title { font-size: 18px; }
    .ft-subscribe { width: 100%; }
    .ft-subscribe input { flex: 1; width: auto; }
    .ft-grid { gap: 24px; }
    .ft-bottom { margin-top: 20px; padding-top: 20px; }
}
