/* =========================================================
   Theme: Bazaar — colourful marketplace style
   (shared components live in assets/css/base.css)
   ========================================================= */
:root {
    --bg: #f3f5f8;
    --radius: 12px;
    --radius-sm: 10px;
    --font: "Shop Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); } /* room for the bottom menu */
@media (min-width: 900px) { body { padding-bottom: 0; } }

/* Top bar */
.topbar { background: var(--topbar-bg); color: var(--on-topbar); font-size: 13px; }
.topbar__inner { display: flex; gap: 16px; justify-content: space-between; align-items: center; min-height: 36px; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; font-weight: 500; opacity: .95; }
.topbar__item--wide { display: none; }
@media (min-width: 640px) { .topbar__item--wide { display: inline-flex; } }
.topbar__lang a { color: inherit; padding: 3px 10px; border-radius: var(--radius-pill); background: rgba(255,255,255,.14); font-size: 13px; }
.topbar__lang a:hover { background: rgba(255,255,255,.24); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); color: var(--on-header); box-shadow: 0 2px 10px rgba(15,23,42,.12); }
.header__inner {
    display: grid; align-items: center; gap: 8px 10px; padding-top: 10px; padding-bottom: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "burger logo cart" "search search search";
}
@media (min-width: 900px) {
    .header__inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo search cart"; gap: 32px; padding-top: 14px; padding-bottom: 14px; }
    .header__burger { display: none !important; }
}
.header__burger { grid-area: burger; margin-left: -8px; color: inherit; }
.header__burger:hover, .header-cart:hover { background: var(--header-line); }
.header .logo { grid-area: logo; color: inherit; }
.header .logo__mark { background: var(--on-header); color: var(--header-bg); }
.header__search { grid-area: search; display: flex; height: 44px; background: #fff; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
@media (min-width: 900px) { .header__search { height: 46px; max-width: 680px; width: 100%; justify-self: center; } }
.header__search input { flex: 1; min-width: 0; border: 0; padding: 0 14px; color: var(--text); background: transparent; outline: none; font-size: 15px; }
.header__search input::placeholder { color: var(--muted); }
.header__search button { display: grid; place-items: center; width: 52px; border: 0; background: var(--header-btn); color: var(--on-header-btn); transition: filter .15s; }
.header__search button:hover { filter: brightness(.9); }
.header__search:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.45); }
.header-cart { grid-area: cart; color: inherit; padding: 6px 8px; border-radius: var(--radius-sm); }
.header-cart__label { display: none; }
@media (min-width: 900px) { .header-cart__label { display: inline; } }
.header .count { box-shadow: 0 0 0 2px var(--header-bg); }

/* Category menu (desktop) */
.catnav { display: none; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border); }
@media (min-width: 900px) { .catnav { display: block; } }
.catnav__inner { display: flex; flex-wrap: wrap; gap: 4px 6px; padding-top: 8px; padding-bottom: 8px; } /* wraps (no side scrolling) so drop-downs are not cut off */
.catnav__inner::-webkit-scrollbar { display: none; }
.catnav a { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius-pill); text-decoration: none; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.lang-bn .catnav a { font-size: 1.06rem; }
.catnav a:hover { background: var(--primary-50); color: var(--primary-700); }
.catnav a[aria-current="page"] { background: var(--primary-50); color: var(--primary-700); }

/* Home */
.hero { box-shadow: var(--shadow); }
.deals { background: linear-gradient(180deg, var(--accent-50), var(--surface) 70%); padding: 18px 14px; border-radius: var(--radius-lg); border: 1px solid var(--accent-100); }
@media (min-width: 768px) { .deals { padding: 24px; } }
.deals .section-head__icon { background: var(--accent); color: var(--on-accent); }

/* Cards on the grey page background */
.product-card, .trust li, .cat-grid__item { border-color: transparent; box-shadow: var(--shadow-sm); }
.product-card:hover { border-color: transparent; box-shadow: var(--shadow); }
.summary, .card, .empty-box { box-shadow: var(--shadow-sm); border-color: transparent; }
.badge-sale { border-radius: 0 0 10px 0; top: 0; left: 0; padding: 4px 10px; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; }
.site-footer h3 { color: #fff; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer .logo { color: #fff; }
.site-footer .contact-list .icon { color: var(--primary-200); }
.site-footer .social-links a { border-color: #334155; }
.site-footer__bottom { border-top-color: #1e293b; color: #94a3b8; }

/* Mobile bottom menu */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(15,23,42,.06);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav > a, .bottomnav > button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px;
    border: 0; background: none; padding: 6px 0; font-size: 11.5px; font-weight: 500; text-decoration: none; color: var(--muted);
}
.bottomnav > a[aria-current="page"], .bottomnav > a:hover, .bottomnav > button:hover { color: var(--primary-700); }
.bottomnav .header-cart__icon .count { top: -6px; right: -10px; }
.bottomnav__cart { gap: 2px !important; }
.bottomnav__cart .header-cart__label { display: inline; }
@media (min-width: 900px) { .bottomnav { display: none; } }

.header__search { border: 1px solid var(--header-line); }
