/* ==========================================================================
   Barabazer Retailer Panel — modern design system v2
   (class & CSS-variable names preserved for backward compatibility)
   ========================================================================== */
:root {
  --bb-blue: #2874F0;
  --bb-blue-dark: #1A53C0;
  --bb-blue-grad: linear-gradient(135deg, #2874F0 0%, #1e5fd0 100%);
  --bb-yellow: #FF9F00;
  --bb-yellow-dark: #F57C00;
  --bb-navy: #172337;
  --bb-bg: #F3F5FA;
  --bb-white: #FFFFFF;
  --bb-green: #14924E;
  --bb-orange: #F57C00;
  --bb-red: #FF5468;
  --text-dark: #1B2330;
  --text-grey: #707A8A;
  --border: #E6E9F0;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-sm: 0 2px 10px rgba(28, 42, 71, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 42, 71, 0.12);
  --shadow-lg: 0 18px 48px rgba(28, 42, 71, 0.18);
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-head: 'Poppins', 'Inter', sans-serif;
  --ease: cubic-bezier(0.22, 0.7, 0.24, 1);
  --bb-nav-height: 64px;
  --bb-cat-nav-height: 76px;
  --bb-mobile-nav-height: 60px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(40, 116, 240, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(255, 159, 0, 0.06), transparent 55%),
    var(--bb-bg);
  font-family: var(--font-body);
  margin: 0;
  color: var(--text-dark);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  max-width: 100%;
}
.bb-container { flex: 1 0 auto; width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }

a { text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd6e4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b4bed1; background-clip: content-box; }

/* ── Keyframes ──────────────────────────────────────────────────────── */
@keyframes bbShimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes bbFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes bbPop { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes bbFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(6deg); } }
@keyframes bbSpinY { to { transform: rotateY(360deg); } }
@keyframes bbGlow { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }

/* ── Scroll reveal (added by retailer.js) ───────────────────────────── */
.bb-reveal { opacity: 0; transform: translateY(22px); }
.bb-reveal.bb-in { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }

/* ── Top progress bar ───────────────────────────────────────────────── */
#bb-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--bb-yellow), #ffd166);
  box-shadow: 0 0 12px rgba(255, 159, 0, 0.7);
  z-index: 3000; transition: width 0.2s ease, opacity 0.3s ease; opacity: 0;
}
#bb-progress.active { opacity: 1; }

/* ── Navbar ─────────────────────────────────────────────────────────── */
.bb-navbar {
  background: linear-gradient(120deg, #1e5fd0 0%, #2874F0 55%, #3b86ff 100%);
  padding: 12px 22px;
  display: flex; align-items: center; gap: 18px;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 6px 22px rgba(20, 56, 130, 0.28);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.bb-navbar .bb-brand {
  color: #fff; font-weight: 700; font-size: 21px; font-family: var(--font-head);
  white-space: nowrap; display: flex; align-items: center; gap: 9px;
  text-decoration: none;
}
.bb-navbar .bb-brand:hover,
.bb-navbar .bb-brand:focus { color: #fff; text-decoration: none; }
.bb-brand-logo {
  height: 40px;
  width: auto;
  max-width: 118px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  padding: 4px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
  display: block;
}
.bb-brand--with-text .bb-brand-logo { max-width: 110px; height: 40px; }
.bb-brand--with-text .bb-brand-txt { display: flex !important; }
.bb-nav-right a { color: rgba(255,255,255,0.92); text-decoration: none; }
.bb-nav-right a.bb-nav-active { color: #fff; position: relative; }
.bb-nav-right a.bb-nav-active::after {
  content: ''; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 2px; background: var(--bb-yellow);
}
.bb-search { flex: 1; display: flex; max-width: 540px; position: relative; }
.bb-search input {
  flex: 1; border: 2px solid transparent; border-radius: 30px;
  padding: 11px 18px; font-size: 14px; outline: none; min-width: 0;
  background: rgba(255, 255, 255, 0.97); transition: box-shadow 0.25s, border-color 0.25s;
}
.bb-search input:focus { border-color: var(--bb-yellow); box-shadow: 0 0 0 4px rgba(255, 159, 0, 0.25); }
.bb-search button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: linear-gradient(135deg, var(--bb-yellow), var(--bb-yellow-dark));
  border: none; width: 38px; height: 38px; border-radius: 50%;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.bb-search button:hover { transform: translateY(-50%) scale(1.08); }
.bb-nav-right { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.bb-nav-right > a, .bb-nav-icon {
  color: rgba(255, 255, 255, 0.95); font-size: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  position: relative; background: none; border: none; cursor: pointer;
  transition: transform 0.2s, color 0.2s;
}
.bb-nav-right > a:hover { transform: translateY(-2px); color: #fff; }
.bb-nav-right i { font-size: 20px; }
.bb-badge {
  background: linear-gradient(135deg, #ffd166, var(--bb-yellow)); color: var(--bb-navy);
  font-size: 10px; font-weight: 800; border-radius: 11px; min-width: 18px; height: 18px;
  padding: 0 5px; display: flex; align-items: center; justify-content: center;
  position: absolute; top: -7px; right: -10px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
.bb-badge.red { background: linear-gradient(135deg, #ff7a8a, var(--bb-red)); color: #fff; }
.bb-badge.hidden { display: none; }

.bb-profile-menu { position: relative; }
.bb-profile-circle {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd166, var(--bb-yellow));
  color: var(--bb-navy); font-weight: 800; font-family: var(--font-head);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.7); transition: transform 0.2s, box-shadow 0.2s;
}
.bb-profile-circle:hover { transform: scale(1.06); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.bb-dropdown {
  position: absolute; right: 0; top: 50px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 200px; padding: 8px; display: none; z-index: 1100;
  transform-origin: top right; animation: bbFadeUp 0.18s ease;
}
.bb-dropdown.show { display: block; }
.bb-dropdown a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: var(--text-dark); font-size: 14px; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.bb-dropdown a:hover { background: rgba(40, 116, 240, 0.08); color: var(--bb-blue); }

/* ── Top category icon strip (below navbar) ─────────────────────────── */
.bb-top-cat-nav {
  position: sticky;
  top: var(--bb-nav-height);
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(20, 40, 90, 0.06);
}
.bb-top-cat-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 12px;
  scrollbar-width: none;
}
.bb-top-cat-inner::-webkit-scrollbar { display: none; }
.bb-top-cat-item {
  flex: 0 0 auto;
  min-width: 72px;
  max-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 10px;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.bb-top-cat-item:hover,
.bb-top-cat-item.active {
  background: rgba(40, 116, 240, 0.08);
  color: var(--bb-blue);
}
.bb-top-cat-ico {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f4f7fc, #e8eef8);
  border: 1px solid rgba(40, 116, 240, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bb-top-cat-ico img { width: 100%; height: 100%; object-fit: cover; }
.bb-top-cat-ico i { font-size: 22px; color: var(--bb-blue); }
.bb-top-cat-lbl {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
@media (min-width: 992px) {
  .bb-top-cat-inner {
    justify-content: space-between;
    overflow-x: visible;
    gap: 8px;
    padding: 12px 18px;
  }
  .bb-top-cat-item { flex: 1 1 0; min-width: 0; max-width: none; }
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.bb-container { max-width: 1300px; margin: 0 auto; padding: 22px 18px 40px; }
.bb-section { margin-bottom: 30px; }
.bb-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 20px 18px 22px;
}
.bb-panel--products { padding: 18px; margin-bottom: 20px; }
.bb-section.bb-panel { margin-bottom: 24px; }
.bb-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.bb-section-head > div { min-width: 0; }
.bb-section-sub { margin: 4px 0 0; padding-left: 14px; font-size: 12px; color: var(--text-grey); font-weight: 500; line-height: 1.35; }
.bb-buy-again-section { margin-bottom: 18px; }
.bb-buy-again-section .bb-scroll-row { max-width: 100%; }
.bb-section-head h2 { font-size: 20px; margin: 0; font-weight: 700; position: relative; padding-left: 14px; }
.bb-section-head h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 22px; border-radius: 4px;
  background: linear-gradient(180deg, var(--bb-yellow), var(--bb-yellow-dark));
  box-shadow: 0 2px 8px rgba(255, 159, 0, 0.35);
}
.bb-section-head a { color: var(--bb-blue); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; transition: gap 0.2s; }
.bb-section-head a:hover { gap: 9px; }

/* ── Status banners ─────────────────────────────────────────────────── */
.bb-banner-alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 14px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; animation: bbFadeUp 0.4s ease; }
.bb-banner-alert.red { background: linear-gradient(135deg, #fff0f2, #ffe3e7); color: #C62828; border: 1px solid #ffd3d9; }
.bb-banner-alert.orange { background: linear-gradient(135deg, #fff7ea, #fff0d8); color: #E65100; border: 1px solid #ffe2b8; }
.bb-banner-alert.green { background: linear-gradient(135deg, #e8f5e9, #f1f8e9); color: #2E7D32; border: 1px solid #c8e6c9; }

/* ── Hero / banner slider ───────────────────────────────────────────── */
.bb-hero-section { margin-bottom: 26px; }

/* Category-wise Bootstrap carousel (homepage) */
.bb-cat-banner-carousel {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #1a3a7a;
  max-width: 100%;
}
.bb-cat-banner-link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.bb-cat-banner-img {
  width: 100%;
  aspect-ratio: 21 / 8;
  min-height: 160px;
  max-height: 340px;
  object-fit: cover;
  object-position: center;
}
.bb-cat-banner-fallback {
  aspect-ratio: 21 / 8;
  min-height: 160px;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
}
.bb-cat-banner-fallback i { font-size: 42px; opacity: 0.9; }
.bb-cat-banner-fallback--0 { background: linear-gradient(125deg, #1a4eb8, #2874F0 55%, #5a9bff); }
.bb-cat-banner-fallback--1 { background: linear-gradient(125deg, #0d7a4a, #1fa463 55%, #5fd39a); }
.bb-cat-banner-fallback--2 { background: linear-gradient(125deg, #7b1fa2, #ab47bc 55%, #e1bee7); }
.bb-cat-banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
}
.bb-cat-banner-label {
  display: block;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.bb-cat-banner-sub {
  display: block;
  font-size: 13px;
  opacity: 0.92;
  margin-top: 4px;
}
.bb-cat-banner-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
}
.bb-cat-banner-carousel .carousel-indicators .active {
  background: var(--bb-yellow);
}
.bb-cat-banner-carousel .carousel-control-prev,
.bb-cat-banner-carousel .carousel-control-next {
  width: 12%;
  opacity: 0;
  transition: opacity 0.25s;
}
.bb-cat-banner-carousel:hover .carousel-control-prev,
.bb-cat-banner-carousel:hover .carousel-control-next { opacity: 1; }
@media (max-width: 576px) {
  .bb-cat-banner-img,
  .bb-cat-banner-fallback {
    aspect-ratio: 16 / 9;
    min-height: 140px;
    max-height: 220px;
  }
  .bb-cat-banner-label { font-size: 16px; }
  .bb-cat-banner-caption { padding: 12px 14px; }
  .bb-cat-banner-sub { font-size: 12px; line-height: 1.3; }
  .bb-cat-banner-carousel .carousel-control-prev,
  .bb-cat-banner-carousel .carousel-control-next { opacity: 1; width: 36px; }
}

.bb-hero-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #1a3a7a;
}
.bb-slider-track { display: flex; transition: transform 0.65s var(--ease); will-change: transform; }
.bb-slide { min-width: 100%; flex-shrink: 0; }
.bb-slide-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 170px;
  max-height: 380px;
  overflow: hidden;
  background: #1a3a7a;
}
.bb-banner-fill {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  object-position: center;
  filter: blur(22px) saturate(1.15);
  transform: scale(1.05);
  opacity: 0.75;
  pointer-events: none;
}
.bb-banner-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.bb-slide-caption {
  display: none;
}
.bb-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--bb-blue);
  box-shadow: 0 8px 24px rgba(20, 40, 90, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.2s, background 0.2s;
}
.bb-hero-slider:hover .bb-slider-arrow { opacity: 1; }
.bb-slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.bb-slider-prev { left: 14px; }
.bb-slider-next { right: 14px; }
.bb-slide-fallback {
  position: relative;
  min-height: 220px;
  aspect-ratio: 21 / 8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(125deg, #1a4eb8 0%, #2874F0 42%, #5a9bff 100%);
  font-family: var(--font-head);
}
.bb-slide-fallback-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 28px 24px;
  max-width: 520px;
  animation: bbFadeUp 0.6s var(--ease);
}
.bb-hero-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(6px);
}
.bb-slide-fallback h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin: 0 0 10px; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.15); }
.bb-slide-fallback p { z-index: 2; opacity: 0.95; margin: 0 0 20px; font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
.bb-slide-fallback .bb-btn { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2); }
.bb-slide-fallback::before,
.bb-slide-fallback::after {
  content: ''; position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 70%);
  animation: bbFloat 7s ease-in-out infinite;
}
.bb-slide-fallback::before { width: 240px; height: 240px; top: -70px; left: -50px; }
.bb-slide-fallback::after { width: 320px; height: 320px; bottom: -120px; right: -60px; animation-delay: -3s; }
.bb-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 9px; z-index: 3; }
.bb-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); cursor: pointer; transition: width 0.3s, background 0.3s; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.bb-dots span.active { background: #fff; width: 26px; border-radius: 5px; }

/* Trust strip under hero */
.bb-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.bb-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.bb-trust-item i { font-size: 18px; color: var(--bb-blue); }
.bb-trust-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(40, 116, 240, 0.25); }

@media (max-width: 575.98px) {
  .bb-slide-frame { aspect-ratio: 16 / 9; min-height: 150px; max-height: 220px; }
  .bb-trust-strip { grid-template-columns: repeat(2, 1fr); }
  .bb-slider-arrow { width: 36px; height: 36px; opacity: 1; }
  .bb-slider-prev { left: 8px; }
  .bb-slider-next { right: 8px; }
}

/* Legacy slider alias */
.bb-slider:not(.bb-hero-slider) { position: relative; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); }

/* ── Category scroll row ────────────────────────────────────────────── */
.bb-cat-row { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 12px; scrollbar-width: none; }
.bb-cat-row::-webkit-scrollbar { display: none; }
.bb-cat-pill { flex: 0 0 auto; width: 96px; text-align: center; color: var(--text-dark); transition: transform 0.25s var(--ease); }
.bb-cat-pill:hover { transform: translateY(-5px); }
.bb-cat-pill .bb-cat-icon {
  width: 78px; height: 78px; border-radius: 22px; margin: 0 auto 9px;
  background: linear-gradient(145deg, #ffffff, #eef2fb);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 30px; color: var(--bb-blue);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s, color 0.3s;
}
.bb-cat-pill:hover .bb-cat-icon {
  box-shadow: 0 14px 32px rgba(40, 116, 240, 0.32);
  background: linear-gradient(145deg, var(--bb-blue), #4f95ff);
  color: #fff;
  transform: scale(1.04);
}
.bb-cat-pill .bb-cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.bb-cat-pill span { font-size: 12px; display: block; line-height: 1.3; font-weight: 500; }
@media (min-width: 768px) { .bb-cat-row { display: grid; grid-template-columns: repeat(7, 1fr); overflow: visible; } .bb-cat-pill { width: auto; } }

/* ── Product grid & cards ───────────────────────────────────────────── */
.bb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.bb-grid--auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)); }
@media (min-width: 576px) { .bb-grid { grid-template-columns: repeat(3, 1fr); } .bb-grid--auto { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); } }
@media (min-width: 992px) { .bb-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } .bb-grid--auto { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); } }

.bb-scroll-row { display: flex; gap: 16px; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.bb-scroll-row::-webkit-scrollbar { display: none; }
.bb-scroll-row .bb-card { flex: 0 0 168px; scroll-snap-align: start; }

/* Product row auto-carousel (New Arrivals) */
.bb-product-carousel { position: relative; overflow: hidden; }
.bb-scroll-row--carousel {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-left: 4px;
  padding-right: 4px;
}
.bb-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--bb-blue);
  box-shadow: 0 4px 16px rgba(28, 42, 71, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.2s, box-shadow 0.2s;
}
.bb-product-carousel:hover .bb-carousel-arrow { opacity: 1; }
.bb-carousel-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 22px rgba(40, 116, 240, 0.22);
}
.bb-carousel-prev { left: -6px; }
.bb-carousel-next { right: -6px; }
@media (max-width: 767.98px) {
  .bb-carousel-arrow { opacity: 1; width: 32px; height: 32px; font-size: 16px; }
  .bb-carousel-prev { left: 0; }
  .bb-carousel-next { right: 0; }
  .bb-scroll-row--carousel { padding-left: 36px; padding-right: 36px; }
}

.bb-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  border: 1px solid rgba(230, 233, 240, 0.9);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s;
}
.bb-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 0.35s;
  background: linear-gradient(135deg, rgba(40, 116, 240, 0.04), rgba(255, 159, 0, 0.03));
}
.bb-card:hover { box-shadow: 0 16px 40px rgba(40, 116, 240, 0.14); transform: translateY(-6px); border-color: rgba(40, 116, 240, 0.22); }
.bb-card:hover::after { opacity: 1; }
.bb-card-link { color: inherit; display: block; }
.bb-card-img {
  aspect-ratio: 1 / 1;
  max-height: 148px;
  background: linear-gradient(110deg, #f0f3f9 25%, #f7f9fd 37%, #f0f3f9 50%);
  background-size: 800px 100%; animation: bbShimmer 1.4s linear infinite;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.bb-card-img:has(img.is-loaded) { animation: none; background: #fff; }
.bb-card-img img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: scale(1.04); transition: opacity 0.45s ease, transform 0.5s var(--ease); }
.bb-card-img img.is-loaded { opacity: 1; transform: scale(1); }
.bb-card:hover .bb-card-img img.is-loaded { transform: scale(1.07); }
.bb-card-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; color: #b6c0d3; gap: 6px; padding: 8px; text-align: center; }
.bb-card-ph i { font-size: 40px; }
.bb-card-ph span { font-size: 11px; color: var(--text-grey); font-weight: 500; }
.bb-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.bb-card-name { font-size: 13px; line-height: 1.35; margin-bottom: 2px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.bb-card-brand { font-size: 11px; color: var(--bb-blue); font-weight: 600; margin-bottom: 4px; display: block; text-decoration: none; }
.bb-card-brand:hover { text-decoration: underline; }
.bb-card-wholesaler { font-size: 10px; color: var(--text-grey); font-weight: 600; margin-bottom: 6px; display: block; text-decoration: none; }
.bb-card-wholesaler:hover { color: var(--bb-blue); }
.bb-price { font-size: 16px; font-weight: 800; color: var(--text-dark); font-family: var(--font-head); }
.bb-price .strike { font-size: 12px; color: var(--text-grey); text-decoration: line-through; font-weight: 400; margin-left: 6px; font-family: var(--font-body); }
.bb-special-badge { display: inline-block; background: linear-gradient(135deg, var(--bb-green), #1eb866); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-bottom: 5px; }
.bb-oos-badge { display: inline-block; background: #ffe3e7; color: var(--bb-red); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.bb-btn-cart {
  margin-top: auto; width: 100%; border: none; border-radius: 10px; padding: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer; min-height: 42px;
  background: linear-gradient(135deg, var(--bb-yellow), var(--bb-yellow-dark)); color: #fff;
  box-shadow: 0 6px 16px rgba(245, 124, 0, 0.28); transition: transform 0.15s, box-shadow 0.25s, filter 0.2s;
}
.bb-btn-cart:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(245, 124, 0, 0.36); filter: brightness(1.03); }
.bb-btn-cart:active { transform: translateY(0) scale(0.98); }
.bb-btn-cart:disabled { background: #e6e9f0; color: #9aa4b5; cursor: not-allowed; box-shadow: none; }
.bb-btn-cart.added { background: linear-gradient(135deg, var(--bb-green), #1eb866); box-shadow: 0 8px 20px rgba(20, 146, 78, 0.32); }

/* ── Generic buttons ────────────────────────────────────────────────── */
.bb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: none; border-radius: 11px; padding: 12px 22px; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 46px; text-align: center; transition: transform 0.15s, box-shadow 0.25s, filter 0.2s; }
.bb-btn:active { transform: scale(0.98); }
.bb-btn-yellow { background: linear-gradient(135deg, var(--bb-yellow), var(--bb-yellow-dark)); color: #fff; box-shadow: 0 8px 20px rgba(245, 124, 0, 0.3); }
.bb-btn-yellow:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(245, 124, 0, 0.4); }
.bb-btn-blue { background: linear-gradient(135deg, var(--bb-blue), var(--bb-blue-dark)); color: #fff; box-shadow: 0 8px 20px rgba(40, 116, 240, 0.32); }
.bb-btn-blue:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(40, 116, 240, 0.42); }
.bb-btn-outline { background: #fff; border: 1.5px solid var(--bb-blue); color: var(--bb-blue); }
.bb-btn-outline:hover { background: rgba(40, 116, 240, 0.06); }
.bb-btn-block { width: 100%; }

/* ── Empty state ────────────────────────────────────────────────────── */
.bb-empty { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 64px 20px; text-align: center; color: var(--text-grey); animation: bbFadeUp 0.5s ease; }
.bb-empty i { font-size: 56px; color: #cdd5e3; display: inline-block; margin-bottom: 16px; animation: bbFloat 5s ease-in-out infinite; }
.bb-empty h3 { font-size: 20px; color: var(--text-dark); margin: 0 0 8px; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.bb-footer { background: linear-gradient(120deg, #141d2e, #1f2c45); color: rgba(255, 255, 255, 0.82); padding: 30px 18px; text-align: center; font-size: 13px; margin-top: 44px; }
.bb-footer a { color: var(--bb-yellow); margin: 0 10px; transition: opacity 0.2s; }
.bb-footer a:hover { opacity: 0.8; }

/* ── Sticky mobile cart bar ─────────────────────────────────────────── */
.bb-sticky-cart { position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(135deg, var(--bb-blue), var(--bb-blue-dark)); color: #fff; padding: 12px 16px; display: none; align-items: center; justify-content: space-between; z-index: 1000; box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18); }
.bb-sticky-cart .bb-btn { padding: 8px 18px; min-height: 38px; }
@media (max-width: 575.98px) { .bb-sticky-cart.show { display: flex; } }

/* ── SweetAlert2 theming ────────────────────────────────────────────── */
.swal2-popup { border-radius: var(--radius-lg) !important; font-family: var(--font-body) !important; }
.swal2-title { font-family: var(--font-head) !important; }
.swal2-styled.swal2-confirm { background: linear-gradient(135deg, var(--bb-yellow), var(--bb-yellow-dark)) !important; border-radius: 10px !important; box-shadow: 0 8px 20px rgba(245, 124, 0, 0.3) !important; }
.swal2-styled.swal2-cancel { border-radius: 10px !important; }
.swal2-toast { border-radius: 12px !important; box-shadow: var(--shadow-md) !important; }

/* ── Non-prefixed aliases (spec + helper usage) ─────────────────────── */
:root {
  --blue: var(--bb-blue); --yellow: var(--bb-yellow); --navy: var(--bb-navy);
  --bg: var(--bb-bg); --white: var(--bb-white); --green: var(--bb-green);
  --red: var(--bb-red); --orange: var(--bb-orange);
  --text-medium: #424242; --text-light: #9E9E9E;
}

/* ── Navbar brand subtitle + mobile rules ───────────────────────────── */
.bb-navbar .bb-brand { flex-shrink: 0; min-width: 0; }
.bb-brand-txt { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.bb-brand-name { white-space: nowrap; }
.bb-brand-txt small { font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.8); letter-spacing: 0.04em; font-family: var(--font-body); white-space: nowrap; }
.bb-dd-head { padding: 10px 14px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.bb-dd-head strong { display: block; font-size: 14px; }
.bb-dd-head span { font-size: 12px; color: var(--text-grey); }
.bb-dropdown a i { width: 18px; text-align: center; }
@media (max-width: 767.98px) {
  .bb-navbar { padding: 8px 12px; gap: 10px; }
  .bb-search { display: none; }
  .bb-navbar .bb-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    gap: 8px;
  }
  .bb-brand-logo {
    height: 32px;
    width: 32px;
    max-width: 32px;
    padding: 3px;
    flex-shrink: 0;
  }
  .bb-brand--with-text .bb-brand-txt {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }
  .bb-brand--with-text .bb-brand-txt small { display: none; }
  .bb-brand--with-text .bb-brand-name {
    font-size: 12px;
    line-height: 1.15;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }
  .bb-nav-hide-mobile { display: none !important; }
  .bb-nav-lbl { display: none; }
  .bb-nav-right { gap: 14px; flex-shrink: 0; margin-left: 0; }
  .bb-nav-right > a, .bb-nav-icon { min-width: 22px; padding: 0; }
  .bb-nav-right i { font-size: 20px; }
  .bb-profile-circle { width: 30px; height: 30px; font-size: 12px; flex-shrink: 0; }
  .bb-badge { right: -7px; top: -5px; min-width: 16px; height: 16px; font-size: 9px; }
  .bb-container { padding: 14px 12px 28px; }
  .bb-panel { padding: 16px 12px 18px; }
  .bb-hero-section { max-width: 100%; }
  .bb-cat-pref-bar { align-items: stretch; }
  .bb-banner-alert { flex-wrap: wrap; word-break: break-word; }
  .home-search { max-width: 100%; margin-bottom: 16px; }
  .bb-section-head a { flex-shrink: 0; white-space: nowrap; padding-top: 2px; }
}
@media (max-width: 575.98px) {
  .bb-navbar { padding: 8px 10px; gap: 8px; }
  .bb-brand--with-text .bb-brand-name { font-size: 11px; }
  .bb-nav-right { gap: 12px; }
}

/* ── Product card extras (category tag, price row, badges) ──────────── */
.bb-cat-tag { display: inline-block; background: #eef1f7; color: var(--text-grey); font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 5px; margin-bottom: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-price-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bb-left-badge { background: #fff3e0; color: var(--bb-orange); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.bb-margin-badge { background: #e8f5e9; color: #2e7d32; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.bb-oos-text { color: var(--bb-red); font-weight: 700; font-size: 13px; text-align: center; padding: 9px 0; }
.bb-wishlist-btn,
.bb-save-store {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.96); color: #9aa4b5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.14); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  pointer-events: auto;
}
.bb-wishlist-btn:hover,
.bb-save-store:hover { transform: scale(1.08); background: #fff; color: var(--bb-blue); }
.bb-wishlist-btn.is-saved,
.bb-save-store.is-saved { color: var(--bb-blue); }
.bb-wishlist-btn.is-saved:hover { color: var(--bb-blue-dark); }
.bb-wishlist-row {
  width: 100%; margin-top: 8px; padding: 7px 10px; border: 1px solid #e0e6f0;
  border-radius: 8px; background: #fafbfc; color: #6b7280; font-size: 12px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.bb-wishlist-row i { color: #9aa4b5; }
.bb-wishlist-row:hover { border-color: var(--bb-blue); color: var(--bb-blue); }
.bb-wishlist-row:hover i { color: var(--bb-blue); }
.bb-wishlist-row.is-saved { border-color: rgba(40, 116, 240, 0.35); color: var(--bb-blue-dark); background: #f4f8ff; }
.bb-wishlist-row.is-saved i { color: var(--bb-blue); }
.bb-btn.bb-btn-outline.is-saved,
[data-save-store].bb-btn.is-saved { border-color: rgba(40, 116, 240, 0.45); color: var(--bb-blue-dark); background: #f4f8ff; }
.bb-btn.bb-btn-outline.is-saved i,
[data-save-store].bb-btn.is-saved i { color: var(--bb-blue); }
.bb-supplier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.bb-supplier-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px;
  background: #fff; border: 1px solid #e8ecf4; border-radius: var(--radius-lg);
  text-decoration: none; color: inherit; transition: box-shadow 0.25s, border-color 0.25s;
}
.bb-supplier-card:hover { box-shadow: var(--shadow-sm); border-color: rgba(40,116,240,0.25); }
.bb-supplier-icon { font-size: 24px; color: var(--bb-blue); }
.bb-supplier-name { font-weight: 700; font-size: 14px; }
.bb-supplier-count { font-size: 12px; color: var(--text-grey); }
.bb-brand-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.bb-brand-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: #fff; border: 1px solid #e0e6f0; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-dark); text-decoration: none;
}
.bb-brand-chip:hover { border-color: var(--bb-blue); color: var(--bb-blue); }
.bb-brand-chip small { color: var(--text-grey); font-weight: 500; }

/* ── Products page filter bar ───────────────────────────────────────── */
.filter-bar {
  position: relative;
  z-index: 1;
  background: #fff;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.fb-search { position: relative; width: 100%; margin-bottom: 10px; }
.fb-search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-grey); }
.fb-search input {
  width: 100%; padding: 11px 40px; border: 1.5px solid var(--border); border-radius: 26px;
  font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.fb-search input:focus { border-color: var(--bb-blue); box-shadow: 0 0 0 3px rgba(40, 116, 240, 0.12); }
.fb-clear { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-grey); font-size: 20px; line-height: 1; }
.fb-pills-row { display: flex; align-items: center; gap: 10px; }
.fb-pills {
  flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 2px; align-items: center;
}
.fb-pills::-webkit-scrollbar { display: none; }
.fb-subpills { margin-top: 8px; animation: bbFadeUp 0.3s ease; }
.pill {
  flex: 0 0 auto; padding: 7px 16px; border-radius: 20px; border: 1.5px solid var(--border);
  background: #fff; color: var(--text-medium); font-size: 13px; font-weight: 600;
  white-space: nowrap; transition: all 0.18s; cursor: pointer;
}
.pill:hover { border-color: var(--bb-blue); color: var(--bb-blue); }
.pill.active {
  background: linear-gradient(135deg, var(--bb-blue), var(--bb-blue-dark));
  border-color: var(--bb-blue); color: #fff; box-shadow: 0 4px 12px rgba(40, 116, 240, 0.28);
}
.pill-sub { padding: 5px 13px; font-size: 12px; }
.pill-sub.active { background: var(--bb-navy); border-color: var(--bb-navy); box-shadow: none; }
.sort-dd { flex: 0 0 auto; position: relative; }
.sort-dd > summary { list-style: none; cursor: pointer; user-select: none; }
.sort-dd > summary::-webkit-details-marker { display: none; }
.sort-dd[open] > summary.pill-sort {
  border-color: var(--bb-blue); color: var(--bb-blue); background: #f0f6ff;
}
.pill-sort { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.sort-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-md); min-width: 200px; padding: 6px; z-index: 1100;
}
.sort-menu a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--text-dark); font-size: 14px; }
.sort-menu a:hover { background: var(--bb-bg); }
.sort-menu a.active { color: var(--bb-blue); font-weight: 700; }
.results-count { color: var(--text-grey); font-size: 13px; margin-bottom: 12px; }
.prod-pager { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 24px; }
.pager-info { color: var(--text-grey); }
@media (min-width: 768px) {
  /* Desktop: navbar search is primary — avoid duplicate search in content area */
  .filter-bar .fb-search { display: none; }
  .filter-bar { margin-top: 0; }
}
@media (max-width: 991.98px) {
  :root { --bb-nav-height: 56px; --bb-cat-nav-height: 72px; }
}
@media (max-width: 767.98px) {
  .filter-bar .fb-search { display: block; }
  .filter-bar { margin-top: 8px; padding: 12px 14px; }
}
@media (max-width: 575.98px) {
  .filter-bar { margin-bottom: 16px; }
  .pill-sort { max-width: 120px; font-size: 12px; padding: 7px 12px; }
}

/* ── Welcome strip + quick actions (home) ───────────────────────────── */
.bb-welcome-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.bb-welcome {
  background: linear-gradient(135deg, #fff 0%, #f7f9ff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
}
.bb-welcome-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bb-blue);
}
.bb-welcome-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-dark);
}
.bb-welcome-sub {
  margin: 0 0 16px;
  color: var(--text-grey);
  font-size: 14px;
  line-height: 1.5;
  max-width: 420px;
}
.bb-welcome-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-dark);
  font-size: 12px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.bb-stat-chip:hover,
.bb-stat-chip:focus { text-decoration: none; color: var(--text-dark); }
.bb-stat-chip i { color: var(--bb-blue); font-size: 16px; }
.bb-stat-chip strong { font-weight: 800; font-family: var(--font-head); }
.bb-stat-chip:hover { border-color: rgba(40, 116, 240, 0.35); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.bb-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.bb-quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  min-height: 88px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.25s;
}
.bb-quick-card i { font-size: 24px; opacity: 0.95; }
.bb-quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: #fff; }
.bb-quick-card--blue { background: linear-gradient(135deg, #3b86ff, #2874F0); }
.bb-quick-card--navy { background: linear-gradient(135deg, #2a3d5c, #172337); }
.bb-quick-card--green { background: linear-gradient(135deg, #1eb866, #14924E); }
.bb-quick-card--orange { background: linear-gradient(135deg, #ffb347, #F57C00); }

@media (max-width: 991.98px) {
  .bb-welcome-row { grid-template-columns: 1fr; }
}

/* ── Products page header ───────────────────────────────────────────── */
.bb-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 4px 2px 0;
}
.bb-page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  line-height: 1.1;
}
.bb-page-head p { margin: 0; color: var(--text-grey); font-size: 14px; }
.bb-page-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, #eef4ff, #e3edff);
  color: var(--bb-blue);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(40, 116, 240, 0.2);
}

.bb-suggest-cats {
  margin-top: 8px;
  padding: 20px 18px;
  background: #fff;
  border: 1px dashed rgba(40, 116, 240, 0.25);
  border-radius: var(--radius-lg);
}
.bb-suggest-cats h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.bb-suggest-pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Home search (above category filter) ────────────────────────────── */
.home-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--border); border-radius: 30px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow-sm); margin-bottom: 22px; transition: border-color 0.2s, box-shadow 0.2s; }
.home-search:focus-within { border-color: var(--bb-blue); box-shadow: 0 0 0 4px rgba(40,116,240,0.12); }
.home-search > i { color: var(--text-grey); font-size: 18px; }
.home-search input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; min-width: 0; }
.home-search button { border: none; background: linear-gradient(135deg, var(--bb-yellow), var(--bb-yellow-dark)); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 24px; border-radius: 24px; cursor: pointer; transition: transform 0.15s, filter 0.2s; }
.home-search button:hover { transform: translateY(-1px); filter: brightness(1.04); }
@media (max-width: 575.98px) { .home-search button { padding: 10px 16px; } }
/* Desktop already has the navbar search — avoid a duplicate search bar on home */
@media (min-width: 768px) { .home-search { display: none; } }

/* ── Site footer (Flipkart-style, full-width, end of page) ──────────── */
.site-footer {
  background: linear-gradient(160deg, #1b2740, #141d2e);
  color: rgba(255,255,255,0.78);
  margin-top: 40px;
  flex-shrink: 0;
}
.sf-inner { max-width: 1300px; margin: 0 auto; padding: 36px 22px 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 28px; }
.sf-brand { display: flex; gap: 14px; align-items: flex-start; }
.sf-brand img { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; background: #fff; padding: 4px; flex-shrink: 0; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.sf-name { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: #fff; }
.sf-name b { color: var(--bb-yellow); }
.sf-brand p { font-size: 13px; line-height: 1.6; margin: 6px 0 0; max-width: 360px; }
.sf-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }
.sf-col a:not(.sf-cta) { display: block; color: rgba(255,255,255,0.72); font-size: 14px; padding: 5px 0; transition: color 0.2s, padding-left 0.2s; }
.sf-col a:not(.sf-cta):hover { color: var(--bb-yellow); padding-left: 4px; }
.sf-am-name { font-size: 14px; color: #fff; margin: 0 0 14px; display: flex; align-items: center; gap: 7px; }
.sf-am-name i { color: var(--bb-yellow); }
.sf-help-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-help-btns .sf-cta { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 13px; line-height: 1; padding: 11px 18px; border-radius: 24px; color: #fff; white-space: nowrap; transition: transform 0.18s, filter 0.2s, box-shadow 0.2s; }
.sf-help-btns .sf-cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.sf-help-btns .sf-cta.call { background: linear-gradient(135deg, var(--bb-yellow), var(--bb-yellow-dark)); box-shadow: 0 6px 16px rgba(245,124,0,0.35); }
.sf-help-btns .sf-cta.wa { background: linear-gradient(135deg, #25D366, #128C7E); box-shadow: 0 6px 16px rgba(18,140,126,0.35); }
@media (max-width: 575.98px) { .sf-help-btns { flex-direction: column; align-items: stretch; } .sf-help-btns .sf-cta { width: 100%; } }
.sf-bottom { border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 12.5px; padding: 16px; color: rgba(255,255,255,0.6); }
@media (max-width: 991.98px) { .sf-inner { grid-template-columns: 1fr 1fr; } .sf-brand { grid-column: 1 / -1; } }

/* ── Fixed mobile bottom nav ────────────────────────────────────────── */
.mobile-nav { display: none; }
@media (max-width: 767.98px) {
  body {
    min-height: 100dvh;
    padding-bottom: 0;
  }
  .site-footer {
    margin-top: auto;
    margin-bottom: 0;
    /* Dark footer extends above the fixed tab bar — no white gap below */
    padding-bottom: calc(var(--bb-mobile-nav-height) + env(safe-area-inset-bottom, 0px));
  }
  .sf-inner { grid-template-columns: 1fr; gap: 20px; padding: 26px 18px 18px; }
  .mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 998;
    min-height: var(--bb-mobile-nav-height);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255,255,255,0.97); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    display: flex; align-items: stretch;
  }
  .mn-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9aa4b5; font-size: 10px; font-weight: 600; transition: color 0.2s; padding: 6px 2px; text-decoration: none; }
  .mn-tab-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.1; }
  .mn-tab.active { color: var(--bb-blue); }
  .mn-tab.active .mn-ico i { transform: translateY(-1px) scale(1.08); color: var(--bb-blue); }
  .mn-ico { position: relative; font-size: 21px; line-height: 1; }
  .mn-ico i { transition: transform 0.2s; }
  .mn-badge { position: absolute; top: -6px; right: -10px; background: linear-gradient(135deg, #ffd166, var(--bb-yellow)); color: var(--bb-navy); font-size: 9px; font-weight: 800; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
  .mn-badge.hidden { display: none; }
}

@media (max-width: 575.98px) {
  .home-search button { padding: 10px 14px; font-size: 13px; }
}

/* ── Order progress tracker (order detail + orders list) ───────────── */
.bb-order-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  width: 100%;
  padding: 6px 0 4px;
  --bb-track-dot-size: 26px;
  --bb-track-dot-y: 13px;
}
.bb-order-track--sm {
  --bb-track-dot-size: 12px;
  --bb-track-dot-y: 6px;
  padding: 2px 0;
}
.bb-track-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  padding: 0 1px;
}
.bb-track-step::before {
  content: '';
  position: absolute;
  top: var(--bb-track-dot-y);
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 0;
  transform: translateY(-50%);
}
.bb-track-step:first-child::before { left: 50%; }
.bb-track-step:last-child::before { right: 50%; }
.bb-track-step.is-done::before { background: var(--bb-green); }
.bb-track-node {
  position: relative;
  z-index: 1;
  height: calc(var(--bb-track-dot-size) + 4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bb-track-dot {
  width: var(--bb-track-dot-size);
  height: var(--bb-track-dot-size);
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: calc(var(--bb-track-dot-size) * 0.55);
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
}
.bb-track-step.is-done .bb-track-dot {
  background: var(--bb-green);
  border-color: var(--bb-green);
}
.bb-track-label {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--text-grey);
  max-width: 100%;
  padding: 0 1px;
  word-break: break-word;
  hyphens: auto;
}
.bb-track-step.is-done .bb-track-label {
  color: var(--text-dark);
  font-weight: 600;
}
.bb-order-track--lg .bb-track-label { font-size: 12px; margin-top: 8px; }
@media (max-width: 575.98px) {
  .bb-order-track--lg { --bb-track-dot-size: 22px; --bb-track-dot-y: 11px; }
  .bb-order-track--lg .bb-track-label { font-size: 9px; margin-top: 6px; line-height: 1.2; }
  .bb-order-track--sm .bb-track-label { font-size: 8px; margin-top: 4px; }
}
@media (min-width: 576px) and (max-width: 767.98px) {
  .bb-order-track--lg .bb-track-label { font-size: 10px; }
}

/* ── Order detail / orders list pages ─────────────────────────────── */
.bb-card-box { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px; margin-bottom: 16px; }
.bb-card-box h2 { font-size: 16px; margin: 0 0 12px; }
.od-head { margin-bottom: 16px; }
.od-head h1 { font-size: 22px; margin: 6px 0 2px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--text-grey); }
.bb-pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 12px; display: inline-block; }
.bb-pill.orange { background: #FFF3E0; color: #E65100; }
.bb-pill.blue { background: #E3F2FD; color: #1565C0; }
.bb-pill.green { background: #E8F5E9; color: #2E7D32; }
.bb-pill.red { background: #FFEBEE; color: #C62828; }
.bb-pill.grey { background: #ECEFF1; color: #546E7A; }
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.od-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; gap: 12px; }
.od-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-size: 16px; }
.od-pay-hint { font-size: 12px; color: var(--text-grey); margin: -2px 0 8px; line-height: 1.45; }
.pay-st-paid { color: var(--bb-green); }
.pay-st-overdue { color: var(--bb-red); }
.pay-st-pending { color: var(--bb-orange); }
.od-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.od-items th, .od-items td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.od-items th:nth-child(n+2), .od-items td:nth-child(n+2) { text-align: right; }
.od-prod { display: flex; gap: 10px; align-items: center; }
.od-thumb { width: 46px; height: 46px; flex-shrink: 0; background: var(--bb-bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #bbb; }
.od-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ord-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.ord-tabs::-webkit-scrollbar { display: none; }
.ord-tab { flex: 0 0 auto; padding: 8px 16px; border-radius: 20px; background: #fff; color: var(--text-dark); font-size: 14px; border: 1px solid var(--border); text-decoration: none; }
.ord-tab.active { background: var(--bb-blue); color: #fff; border-color: var(--bb-blue); }
.ord-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px; }
.ord-card .bb-order-track { margin-bottom: 12px; }
.ord-top { display: flex; justify-content: space-between; margin-bottom: 6px; gap: 8px; flex-wrap: wrap; }
.ord-meta { font-size: 14px; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ord-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 767.98px) { .od-grid { grid-template-columns: 1fr; } }

/* ── Part 2: nav shop identity ─────────────────────────────────── */
.bb-nav-shop-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; max-width: 42%; }
.bb-nav-shop-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--bb-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; text-decoration: none !important; }
.bb-nav-shop-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bb-nav-shop-txt { min-width: 0; line-height: 1.2; }
.bb-nav-shop-name { display: block; font-weight: 700; font-size: 14px; color: #fff; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-nav-shop-area { display: block; font-size: 11px; color: rgba(255,255,255,0.82); }
.bb-brand--compact { flex-shrink: 0; }
.bb-profile-circle-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── Credit widget ─────────────────────────────────────────────── */
.bb-credit-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 10px; }
.bb-credit-stats strong { display: block; font-size: 17px; margin-top: 2px; }
.bb-credit-avail strong { color: var(--bb-green); }
.bb-credit-bar { height: 8px; border-radius: 4px; background: #eceff5; overflow: hidden; }
.bb-credit-bar-fill { height: 100%; background: linear-gradient(90deg, var(--bb-blue), #4f95ff); border-radius: 4px; transition: width 0.4s var(--ease); }
.bb-credit-overdue { margin-top: 10px; font-size: 13px; color: var(--bb-red); }

/* ── Category preferences ──────────────────────────────────────── */
.bb-cat-pref-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); font-size: 13px; }
.bb-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-cat-chip { position: relative; display: inline-flex; align-items: center; border: 2px solid var(--border); border-radius: 20px; padding: 8px 14px; cursor: pointer; font-size: 13px; transition: background 0.2s, border-color 0.2s; user-select: none; -webkit-tap-highlight-color: transparent; }
.bb-cat-chip input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bb-cat-chip:hover { border-color: #90caf9; background: #f8fbff; }
.bb-cat-chip.active { background: #E3F2FD; border-color: var(--bb-blue); color: #1565C0; font-weight: 600; }

/* ── Trending product cards ─────────────────────────────────────── */
.bb-card-trending-wrap { position: relative; flex: 0 0 auto; }
.bb-card-trending-wrap::before {
  content: 'Trending';
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: linear-gradient(135deg, #ff6f00, #ff9800);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ── Minimum order quantity ─────────────────────────────────────── */
.bb-min-qty-note { font-size: 11px; color: var(--text-grey); margin-top: 6px; text-align: center; }
.pd-min-qty { font-size: 13px; color: var(--bb-orange); margin-bottom: 12px; }

/* ==========================================================================
   Home polish v3 — scoped to .bb-home (homepage only, other pages untouched)
   A cleaner, airier, more premium feel for the retailer landing page.
   ========================================================================== */
.bb-home .bb-container,
.bb-home main.bb-container { padding-top: 18px; }

/* Section rhythm + headings -------------------------------------------------*/
.bb-home .bb-section { margin-bottom: 26px; }
.bb-home .bb-section-head { align-items: center; margin-bottom: 16px; }
.bb-home .bb-section-head h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding-left: 16px;
}
.bb-home .bb-section-head h2::before {
  width: 6px; height: 24px; border-radius: 6px;
  background: linear-gradient(180deg, var(--bb-blue), var(--bb-yellow));
  box-shadow: 0 4px 12px rgba(40, 116, 240, 0.30);
}
.bb-home .bb-section-head a {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(40, 116, 240, 0.08);
  color: var(--bb-blue);
  font-weight: 700;
  transition: background 0.2s var(--ease), gap 0.2s var(--ease), transform 0.2s var(--ease);
}
.bb-home .bb-section-head a:hover {
  background: rgba(40, 116, 240, 0.16);
  gap: 7px;
  transform: translateY(-1px);
}

/* Cards / panels — softer, rounder, lighter ------------------------------- */
.bb-home .bb-panel {
  border-radius: 22px;
  border-color: #eef1f8;
  box-shadow: 0 8px 28px rgba(28, 42, 71, 0.055);
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

/* Hero carousel — deeper, more cinematic ---------------------------------- */
.bb-home .bb-cat-banner-carousel {
  border-radius: 24px;
  box-shadow: 0 22px 56px rgba(20, 56, 130, 0.22);
}

/* Welcome hero — premium gradient + soft decorative glow ------------------ */
.bb-home .bb-welcome {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(40, 116, 240, 0.10), transparent 70%),
    radial-gradient(360px 200px at 0% 100%, rgba(255, 159, 0, 0.10), transparent 70%),
    linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
  border-radius: 22px;
  border-color: #eaeefb;
  box-shadow: 0 10px 30px rgba(28, 42, 71, 0.07);
}
.bb-home .bb-welcome::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 116, 240, 0.14), transparent 70%);
  pointer-events: none;
}
.bb-home .bb-welcome-title {
  background: linear-gradient(120deg, var(--bb-navy) 0%, var(--bb-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bb-home .bb-stat-chip {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-color: #e6ebf7;
  box-shadow: 0 2px 8px rgba(28, 42, 71, 0.05);
  padding: 9px 15px;
}

/* Quick action cards — glossy + icon chip --------------------------------- */
.bb-home .bb-quick-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 96px;
  box-shadow: 0 8px 22px rgba(28, 42, 71, 0.12);
}
.bb-home .bb-quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28) 0%, transparent 45%);
  pointer-events: none;
}
.bb-home .bb-quick-card i {
  font-size: 22px;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.20);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.bb-home .bb-quick-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(28, 42, 71, 0.20); }

/* Trust strip — pill style ------------------------------------------------- */
.bb-home .bb-trust-item {
  border-radius: 999px;
  border-color: #e9edf7;
  background: rgba(255, 255, 255, 0.9);
}

/* Category pills ----------------------------------------------------------- */
.bb-home .bb-cat-pill span { font-weight: 600; }
@media (min-width: 768px) {
  /* Left-align so a few categories pack neatly instead of stretching across 7 cols */
  .bb-home .bb-cat-row { display: flex; flex-wrap: wrap; gap: 22px; justify-content: flex-start; }
  .bb-home .bb-cat-pill { width: 96px; }
}

/* Category preference bar — sits above "Shop by Category" now ---------------- */
.bb-home .bb-cat-pref-bar {
  border: 1px solid #eef1f8;
  border-radius: 14px;
  margin-bottom: 16px;
}

@media (max-width: 575.98px) {
  .bb-home .bb-section-head h2 { font-size: 18px; }
  .bb-home .bb-quick-card { min-height: 84px; }
}
