:root {
  --kb-bg: #f9f7f0;
  --kb-fg: #2c3e36;
  --kb-fg-dark: #1a2e24;
  --kb-primary: #006837;
  --kb-primary-dark: #004d28;
  --kb-primary-light: #3d9a66;
  --kb-primary-fg: #ffffff;
  --kb-gold: #b8860b;
  --kb-gold-light: #d4a84a;
  --kb-gold-fg: #2a2618;
  --kb-orange: #e8a317;
  --kb-muted: #6b7c72;
  --kb-border: #e5e0d4;
  --kb-surface: #ffffff;
  --kb-danger: #d04a3a;
  --kb-radius: 1rem;
  --kb-radius-lg: 1.5rem;
  --kb-shadow: 0 4px 24px rgba(26, 46, 36, 0.06);
  --kb-shadow-card: 0 8px 28px rgba(26, 46, 36, 0.08);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-urdu: "Noto Nastaliq Urdu", serif;
}

body {
  background: var(--kb-bg);
  color: var(--kb-fg);
  font-family: var(--font-body);
}

.kb-page { background: var(--kb-bg); }

/* ——— Header ——— */
.kb-header {
  background: #ffffff;
  border-bottom: 1px solid var(--kb-border);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  z-index: 1030;
}
.kb-header-wrap {
  padding: 0.65rem 0;
}
@media (min-width: 768px) {
  .kb-header-wrap { padding: 0.75rem 0; }
}
.kb-header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .kb-header-row { gap: 1rem; }
}
.kb-header-logo {
  display: flex;
  align-items: center;
  color: inherit;
}
.kb-header-search { min-width: 0; }
.kb-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: #f3f5f4;
  border: 1px solid var(--kb-border);
  flex-shrink: 0;
}
.kb-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  color: var(--kb-muted);
  white-space: nowrap;
}
.kb-lang-btn.is-active {
  background: #fff;
  color: var(--kb-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.kb-lang-btn:hover {
  color: var(--kb-primary);
}
@media (max-width: 575.98px) {
  .kb-lang-btn {
    min-width: 1.9rem;
    padding: 0.18rem 0.35rem;
    font-size: 0.68rem;
  }
}
.kb-search-input {
  font-size: 0.875rem;
  padding: 0.35rem 0.5rem;
  min-height: auto;
}
@media (max-width: 575.98px) {
  .kb-search-input::placeholder { font-size: 0.8rem; }
  .kb-search-bar { min-height: 42px; padding: 0.2rem 0.35rem 0.2rem 0.5rem; }
  .kb-search-action { width: 30px; height: 30px; font-size: 0.75rem; }
}
.kb-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}
.kb-logo { display: flex; align-items: center; gap: 0.5rem; }
.kb-logo-kissan {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--kb-primary);
  line-height: 1.1;
}
.kb-logo-badshah {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--kb-gold);
  line-height: 1.1;
}
.kb-search-bar {
  display: flex;
  align-items: center;
  background: #f3f5f4;
  border: 1px solid var(--kb-border);
  border-radius: 999px;
  padding: 0.35rem 0.5rem 0.35rem 1rem;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.kb-search-icon { color: var(--kb-muted); margin-right: 0.5rem; }
.kb-search-input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
}
.kb-search-actions { display: flex; gap: 0.25rem; }
.kb-search-action {
  border: none;
  background: var(--kb-primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.kb-search-action--gold { background: var(--kb-gold); }
.kb-header-nav { gap: 0.15rem; flex-shrink: 0; }
.kb-icon-btn {
  color: var(--kb-fg);
  font-size: 1.35rem;
  padding: 0.4rem 0.5rem;
  text-decoration: none;
  border-radius: 0.5rem;
}
.kb-icon-btn:hover { color: var(--kb-primary); background: #f0f4f1; }
.kb-badge-notify {
  position: absolute;
  top: 2px;
  right: 0;
  background: var(--kb-orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.kb-profile-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--kb-primary-dark), var(--kb-primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
}
.btn-sell-now { padding: 0.5rem 1.25rem; font-size: 0.9rem; margin-left: 0.25rem; }

/* ——— Hero ——— */
.kb-hero {
  position: relative;
  overflow: hidden;
  background: var(--kb-bg);
}
.kb-hero-bg {
  display: block;
  position: absolute;
  inset: 0;
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}
.kb-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(249, 247, 240, 0.82) 0%,
    rgba(249, 247, 240, 0.5) 38%,
    rgba(249, 247, 240, 0.22) 55%,
    rgba(249, 247, 240, 0.08) 70%,
    transparent 85%
  );
  pointer-events: none;
}
.kb-hero-watermark {
  display: none;
}
.kb-hero .container-xl {
  position: relative;
  z-index: 1;
}
.kb-hero-copy { max-width: 36rem; }
.kb-hero-line { display: block; }
.kb-hero-amp {
  color: var(--kb-fg-dark);
  font-size: 0.92em;
}
.kb-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--kb-gold-light);
  border-radius: 999px;
  background: #fff;
  color: var(--kb-fg);
  font-size: 0.8rem;
  font-weight: 600;
}
.kb-hero-pill i { color: var(--kb-gold); }
.kb-hero-title {
  font-size: clamp(1.85rem, 6.5vw, 3.25rem);
  line-height: 1.08;
  color: var(--kb-fg-dark);
  margin-bottom: 0;
}
.kb-text-green { color: var(--kb-primary); }
.kb-text-gold { color: var(--kb-gold); }
.kb-hero-lead {
  font-size: 1.05rem;
  color: #1a2e24;
  font-weight: 500;
  max-width: 520px;
  line-height: 1.65;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.85);
}
.kb-hero-urdu {
  font-size: 1.35rem;
  color: var(--kb-gold);
  font-weight: 600;
  margin-top: 0.75rem;
}
.btn-kb-outline {
  background: #fff;
  border: 1px solid var(--kb-border);
  color: var(--kb-fg);
  border-radius: 999px;
  font-weight: 600;
}
.btn-kb-outline:hover {
  background: #f8f8f6;
  border-color: var(--kb-muted);
  color: var(--kb-fg-dark);
}
.kb-stat-box {
  background: rgba(255,255,255,.7);
  border: 1px solid var(--kb-border);
  border-radius: var(--kb-radius);
  padding: 0.75rem;
  text-align: center;
}
.kb-stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--kb-gold);
  line-height: 1.2;
}
.kb-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--kb-muted);
  margin-top: 0.15rem;
}
.kb-featured-card {
  display: block;
  position: relative;
  border-radius: var(--kb-radius-lg);
  overflow: hidden;
  border: 2px solid var(--kb-fg-dark);
  box-shadow: var(--kb-shadow-card);
}
.kb-featured-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
/* Shared hero / ad poster shell */
.kb-hero-poster-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #fff;
  color: inherit;
}
.kb-hero-poster-card.text-decoration-none,
a.kb-hero-poster-card {
  text-decoration: none !important;
  color: inherit !important;
}
.kb-hero-poster-media {
  position: relative;
  overflow: hidden;
  line-height: 0;
}
.kb-hero-poster-media .kb-badge--status {
  top: 0.65rem;
  left: 0.65rem;
  right: auto;
}
.kb-hero-poster-caption {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--kb-border);
  background: #fff;
}
.kb-hero-poster-caption-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--kb-fg-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Hero right poster / ad — desktop column */
@media (min-width: 992px) {
  .kb-hero .row.align-items-center {
    align-items: center !important;
  }
  .kb-hero-poster-col {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 0;
    padding-right: 0.25rem;
  }
  .kb-hero-poster-card {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: 0;
    border-radius: var(--kb-radius-lg);
    border: 1px solid var(--kb-border);
    box-shadow: var(--kb-shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  a.kb-hero-poster-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  }
  .kb-hero-poster-card--ad .kb-hero-poster-img,
  .kb-hero-poster-card.home-ad-sidebar .kb-hero-poster-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
  }
  .kb-hero-poster-card--featured .kb-featured-img,
  .kb-hero-poster-card .kb-featured-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}
@media (min-width: 1200px) {
  .kb-hero-poster-card {
    max-width: 360px;
  }
}
.kb-featured-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-radius: var(--kb-radius);
  padding: 0.85rem 1rem;
}
.kb-featured-title { font-size: 0.95rem; }
.kb-featured-price {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--kb-gold);
  font-size: 1.1rem;
}

/* ——— Sections ——— */
.kb-section-title { color: var(--kb-primary); font-size: 1.5rem; }
.kb-section-heading { color: var(--kb-muted); font-weight: 700; letter-spacing: 0.08em; }
.letter-spacing { letter-spacing: 0.08em; }
.kb-section-sub a.kb-section-link { color: var(--kb-primary); }
.kb-view-all {
  color: var(--kb-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.kb-view-all:hover { text-decoration: underline; }

/* ——— Product cards ——— */
.kb-product-card {
  background: #fff;
  border-radius: var(--kb-radius);
  border: 1px solid var(--kb-border);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.kb-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--kb-shadow-card);
}
.kb-product-media { position: relative; }
.kb-badge {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  z-index: 2;
}
.kb-badge--sale {
  top: 0.5rem;
  left: 0.5rem;
  background: var(--kb-danger);
  color: #fff;
}
.kb-badge--status {
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, var(--kb-gold), var(--kb-gold-light));
  color: var(--kb-gold-fg);
}
.kb-badge--sold {
  top: 0.5rem;
  right: 0.5rem;
  background: #5c636a;
  color: #fff;
  letter-spacing: 0.06em;
}
.kb-product-card--sold .kb-product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 1;
}
.kb-product-sold-banner {
  border-left: 4px solid #5c636a;
}
.kb-pill--sold {
  background: #5c636a;
  color: #fff;
}
.kb-bid-pill--sold {
  background: #eef0f2;
  color: #5c636a;
}
.kb-badge--cat {
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(255,255,255,.85);
  color: var(--kb-muted);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
}
.kb-voice-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--kb-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,104,55,.35);
}
.kb-product-body { padding: 0.85rem; }
.kb-product-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-product-price {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--kb-gold);
  font-size: 1rem;
}
.kb-product-rating { color: var(--kb-gold); font-weight: 600; }
.kb-bid-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--kb-primary);
  background: rgba(0,104,55,.1);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* ——— Workers ——— */
.kb-worker-card {
  background: #fff;
  border: 1px solid var(--kb-border);
  border-radius: var(--kb-radius);
  padding: 1.25rem;
  box-shadow: var(--kb-shadow);
}
.kb-worker-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f0f4f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.kb-worker-price {
  font-weight: 800;
  color: var(--kb-gold);
  font-family: var(--font-display);
}
.kb-rating-pill {
  font-size: 0.75rem;
  background: rgba(0,104,55,.1);
  color: var(--kb-primary);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.kb-rating-pill i { color: var(--kb-gold); }

/* ——— Pre-footer CTA ——— */
.kb-prefooter-cta {
  background: linear-gradient(105deg, var(--kb-primary-dark) 0%, var(--kb-primary-light) 45%, var(--kb-gold-light) 100%);
  border-radius: var(--kb-radius-lg);
  padding: 2.5rem 2rem;
  color: #fff;
  box-shadow: var(--kb-shadow-card);
}
.kb-prefooter-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.5rem; }
.kb-prefooter-text { opacity: 0.92; font-size: 1rem; }

/* ——— Footer ——— */
.kb-footer {
  background: var(--kb-bg);
  border-top: 1px solid var(--kb-border);
  margin-top: 0;
}
@media (max-width: 767.98px) {
  .kb-footer {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0));
  }
  .kb-footer .container-xl {
    padding-top: 1.5rem !important;
    padding-bottom: 1rem !important;
  }
  .kb-footer-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  .kb-footer-links a {
    padding: 0.15rem 0;
  }
}
.kb-footer-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.kb-footer-links a {
  color: var(--kb-muted);
  text-decoration: none;
  display: block;
  padding: 0.2rem 0;
}
.kb-footer-links a:hover { color: var(--kb-primary); }
.kb-footer-contact {
  margin-top: 0.25rem;
}
.kb-footer-contact li + li {
  margin-top: 0.45rem;
}
.kb-footer-contact-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--kb-muted);
  text-decoration: none;
  line-height: 1.45;
}
.kb-footer-contact-link i {
  color: var(--kb-primary);
  font-size: 0.9rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.kb-footer-contact-link:hover {
  color: var(--kb-primary);
}
.kb-social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--kb-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--kb-muted);
  text-decoration: none;
}
.kb-social-btn:hover { color: var(--kb-primary); border-color: var(--kb-primary); }
.kb-site-credit {
  background: var(--kb-fg-dark);
  color: rgba(255,255,255,.75);
  padding: 0.65rem 0;
}
.kb-credit-link {
  color: var(--kb-gold-light);
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.35rem;
}
.kb-credit-link:hover { color: #fff; text-decoration: underline; }

h1, h2, h3, h4, .font-display { font-family: var(--font-display); letter-spacing: -0.02em; }
.font-urdu { font-family: var(--font-urdu); }

.bg-kb-hero {
  background: var(--kb-bg);
}

.glass {
  background: rgba(252, 250, 246, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(217, 208, 192, 0.6);
}

.glass-strong {
  background: rgba(252, 250, 246, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 208, 192, 0.8);
}

.text-gradient-green {
  background: linear-gradient(135deg, #1f4a38, #3d9a66);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #a88628, #d4b84a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-kb-green {
  background: linear-gradient(135deg, var(--kb-primary-dark), var(--kb-primary-light));
  color: var(--kb-primary-fg);
  border: none;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 104, 55, 0.3);
}
.btn-kb-green:hover {
  color: #fff;
  filter: brightness(1.05);
}

.btn-kb-gold {
  background: linear-gradient(135deg, #9a7420, var(--kb-gold-light));
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.35);
}
.btn-kb-gold:hover { color: #fff; filter: brightness(1.05); }

.card-kb {
  background: rgba(252, 250, 246, 0.85);
  border: 1px solid var(--kb-border);
  border-radius: var(--kb-radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-kb:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30, 47, 40, 0.08);
}

.product-img { aspect-ratio: 4/3; object-fit: cover; }
.badge-discount { background: var(--kb-danger); }
.badge-hot { background: linear-gradient(135deg, #a88628, #d4b84a); color: var(--kb-gold-fg); }

/* ——— Mobile bottom nav (client reference) ——— */
.kb-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  background: linear-gradient(180deg, transparent 0%, rgba(249, 247, 240, 0.92) 28%, var(--kb-bg) 100%);
  pointer-events: none;
}
.kb-mobile-nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  margin: 0 0.5rem 0.35rem;
  padding: 0.35rem 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--kb-border);
  border-radius: 1.35rem 1.35rem 1rem 1rem;
  box-shadow: 0 -4px 28px rgba(26, 46, 36, 0.1), 0 8px 24px rgba(26, 46, 36, 0.08);
  backdrop-filter: blur(12px);
}
.kb-mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.2rem;
  min-height: 48px;
  text-decoration: none;
  color: var(--kb-muted);
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.kb-mobile-nav-item:active {
  background: rgba(0, 104, 55, 0.08);
}
.kb-mobile-nav-item i {
  font-size: 1.2rem;
  line-height: 1;
}
.kb-mobile-nav-item.is-active {
  color: var(--kb-primary);
  background: rgba(0, 104, 55, 0.1);
}
.kb-mobile-nav-item.is-active i {
  color: var(--kb-primary);
}

/* Mobile marketplace (/categories) */
.kb-marketplace-mobile-hero {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(0, 77, 40, 0.08), rgba(212, 184, 74, 0.12));
  border: 1px solid var(--kb-border);
  border-radius: var(--kb-radius);
}
.kb-marketplace-mobile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kb-primary-dark, #004d28);
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.kb-marketplace-page .row-cols-2 {
  --bs-gutter-x: 0.65rem;
  --bs-gutter-y: 0.65rem;
}
@media (max-width: 767px) {
  .kb-marketplace-page .kb-product-card .kb-product-title {
    font-size: 0.82rem;
  }
  .kb-marketplace-page .kb-search-bar {
    min-height: 44px;
  }
}
.kb-mobile-nav-sell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--kb-muted);
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: -1.35rem;
}
.kb-mobile-nav-sell-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #9a7420, var(--kb-gold-light));
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.45);
  border: 3px solid #fff;
  transition: transform 0.15s;
}
.kb-mobile-nav-sell.is-active .kb-mobile-nav-sell-btn,
.kb-mobile-nav-sell:active .kb-mobile-nav-sell-btn {
  transform: scale(1.05);
}
.kb-mobile-nav-badge {
  position: absolute;
  top: 0;
  right: 18%;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.kb-site main {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0));
}
@media (min-width: 768px) {
  .kb-site main { padding-bottom: 0; }
}

/* ——— Urdu locale (layout stays LTR; only text direction/font changes) ——— */
.kb-locale-ur .font-urdu {
  font-family: var(--font-urdu);
  line-height: 1.75;
}
.kb-locale-ur .kb-search-bar {
  direction: ltr;
}
.kb-locale-ur .kb-search-input {
  text-align: right;
  direction: rtl;
}
.kb-locale-ur .kb-header-actions .btn-kb-gold {
  white-space: nowrap;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  font-family: var(--font-urdu);
  line-height: 1.4;
}
.kb-locale-ur .kb-mobile-nav-item span {
  font-family: var(--font-urdu);
  line-height: 1.35;
}
.kb-locale-ur .kb-footer-links a,
.kb-locale-ur .kb-footer-title {
  font-family: var(--font-urdu);
  line-height: 1.6;
}
.kb-btn-i18n {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
}
.kb-btn-i18n i {
  flex-shrink: 0;
  line-height: 1;
}
.kb-locale-ur .kb-product-body .small.text-muted {
  line-height: 1.5;
}
.kb-card-carousel .kb-photo-count {
  top: 6px;
  bottom: auto;
  left: 6px;
  right: auto;
}
.kb-card-carousel .kb-badge--cat {
  left: auto;
  right: 0.5rem;
  max-width: calc(100% - 1rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-card-carousel .kb-card-dots {
  left: 6px;
  right: auto;
}

.hero-overlay {
  background: linear-gradient(90deg, var(--kb-bg) 0%, rgba(244,239,228,.85) 50%, transparent 100%),
    linear-gradient(0deg, var(--kb-bg), transparent 40%);
}

.category-scroll { overflow-x: auto; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }

/* Infinite category marquee */
.category-marquee-wrap {
  overflow: hidden;
  width: 100%;
  padding: 0.25rem 0 0.75rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.category-marquee-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  width: max-content;
  animation: kb-category-marquee 45s linear infinite;
  will-change: transform;
}
.category-marquee-wrap:hover .category-marquee-track {
  animation-play-state: paused;
}
@keyframes kb-category-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .category-marquee-wrap {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
    scrollbar-width: none;
  }
  .category-marquee-track {
    animation: none;
    width: auto;
  }
}

.chat-bubble-me { background: var(--kb-primary); color: var(--kb-primary-fg); border-radius: 1rem 1rem 0.25rem 1rem; }
.chat-bubble-them { background: var(--kb-surface); border: 1px solid var(--kb-border); border-radius: 1rem 1rem 1rem 0.25rem; }

.premium-cta {
  background: linear-gradient(135deg, #1f4a38 0%, #3d9a66 50%, #c4a035 100%);
  color: #faf8f2;
  border-radius: 1.5rem;
}

/* Urdu — avoid gradient clip cutting descenders */
.font-urdu {
  line-height: 1.85;
  overflow: visible;
  padding-bottom: 0.2em;
}
.text-urdu-gold {
  color: var(--kb-gold);
  font-weight: 600;
}

.badge-marketplace-tag {
  background: linear-gradient(135deg, #1f4a38, #3d9a66);
  color: #fff !important;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 16px rgba(31, 74, 56, 0.25);
}

/* Homepage category tiles */
.category-tile {
  position: relative;
  width: 150px;
  min-height: 168px;
  border-radius: var(--kb-radius);
  overflow: hidden;
  border: 1px solid var(--kb-border);
  background-size: cover;
  background-position: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(30, 47, 40, 0.12);
}
.category-tile--fallback {
  background: var(--kb-surface);
}
.category-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 40, 20, 0.35) 100%);
  pointer-events: none;
}
.category-tile--image .category-tile-overlay {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.55) 100%
  );
}
.category-tile--fallback .category-tile-overlay {
  background: linear-gradient(180deg, transparent 40%, rgba(249, 247, 240, 0.5) 100%);
}
.category-tile-body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.65rem;
  text-align: center;
}
.category-tile-caption {
  width: 100%;
  padding: 0.35rem 0.25rem;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border: none;
}
.category-tile--image .category-tile-caption,
.category-tile--fallback .category-tile-caption {
  background: transparent;
  border: none;
}
.category-tile-emoji { font-size: 1.75rem; margin-bottom: 0.25rem; }
.category-tile-name {
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--kb-primary-dark);
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.95),
    0 0 10px rgba(255, 255, 255, 0.75);
}
.category-tile--image .category-tile-name {
  color: #fff;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.65);
}
.category-tile--fallback .category-tile-name {
  color: #004d28;
  text-shadow: none;
}
.category-tile-detail {
  color: #3d5248;
  margin-top: 3px;
  font-weight: 500;
}
.category-tile-count {
  font-size: 0.72rem;
  color: #1a2e24;
  margin-top: 4px;
  font-weight: 700;
  opacity: 0.85;
}

/* ——— Home ad carousel (mobile full-width + desktop hero poster) ——— */
.kb-home-ad-carousel {
  position: relative;
  overflow: hidden;
}
.kb-home-ad-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.kb-home-ad-carousel-track {
  position: relative;
  width: 100%;
}
.kb-home-ad-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  pointer-events: none;
  z-index: 0;
}
.kb-home-ad-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.kb-home-ad-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
  pointer-events: none;
}
.kb-home-ad-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.kb-home-ad-carousel-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

/* Mobile — full-width portrait poster (same 3:4 crop as desktop hero) */
.kb-home-ad-carousel--mobile {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: #1a2e24;
  border-bottom: 1px solid var(--kb-border);
}
.kb-home-ad-carousel--mobile .kb-home-ad-carousel-viewport {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: min(78vh, 560px);
}
.kb-home-ad-carousel--mobile .kb-home-ad-carousel-track {
  position: absolute;
  inset: 0;
  height: 100%;
}
.kb-home-ad-carousel--mobile .kb-home-ad-carousel-link {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
  text-decoration: none;
}
.kb-home-ad-carousel--mobile .kb-home-ad-carousel-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.kb-home-ad-carousel--mobile .kb-home-ad-carousel-link:active .kb-home-ad-carousel-img {
  opacity: 0.96;
}
.kb-home-ad-carousel--mobile .kb-home-ad-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
}

/* Desktop — hero right poster card (matches red-box area in design) */
.kb-home-ad-carousel--hero {
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: 0;
  position: relative;
}
.kb-home-ad-carousel--hero .kb-home-ad-carousel-viewport {
  min-height: 1px;
}
.kb-home-ad-carousel--hero .kb-home-ad-carousel-slide.is-active {
  position: relative;
}
.kb-home-ad-carousel--hero .kb-hero-poster-card {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: var(--kb-radius-lg);
  border: 1px solid var(--kb-border);
  box-shadow: var(--kb-shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kb-home-ad-carousel--hero .kb-hero-poster-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
.kb-home-ad-carousel--hero .kb-hero-poster-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
}
.kb-home-ad-carousel--hero .kb-home-ad-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.35rem;
  padding: 0 0.5rem;
}
@media (min-width: 1200px) {
  .kb-home-ad-carousel--hero {
    max-width: 360px;
  }
}

/* ——— Home mobile promoted ad (legacy single banner) ——— */
.kb-home-mobile-ad {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #1a2e24;
  border-bottom: 1px solid var(--kb-border);
}
.kb-home-mobile-ad-link {
  display: block;
  width: 100%;
  line-height: 0;
  text-decoration: none;
}
.kb-home-mobile-ad-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  vertical-align: middle;
}
.kb-home-mobile-ad-img--banner {
  aspect-ratio: 2.2 / 1;
  min-height: 148px;
  max-height: min(220px, 42vw);
}
.kb-home-mobile-ad-img--poster {
  aspect-ratio: 16 / 9;
  min-height: 160px;
  max-height: min(240px, 48vw);
}
.kb-home-mobile-ad-link:active .kb-home-mobile-ad-img {
  opacity: 0.96;
}

/* Legacy home ad card (desktop sidebar fallback) */
.kb-home-ad-card {
  margin: 0;
}
.kb-home-ad-card .kb-product-media {
  line-height: 0;
}
.kb-home-ad-card .kb-badge--status {
  top: 0.5rem;
  left: 0.5rem;
  right: auto;
  letter-spacing: 0.03em;
}
.kb-home-ad-card-img {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
}
.kb-home-ad-card-img--poster {
  aspect-ratio: 4 / 3;
}
.kb-home-ad-card-img--banner {
  aspect-ratio: 2 / 1;
  max-height: 200px;
}
.kb-home-ad-card:active {
  transform: scale(0.995);
}

/* Profile — order cards */
.kb-order-card {
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kb-order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--kb-shadow-card);
}
.kb-order-card-img {
  width: 72px;
  height: 72px;
  border-radius: var(--kb-radius);
  object-fit: cover;
  display: block;
  border: 1px solid var(--kb-border);
  background: #f3f5f4;
}
.kb-order-card-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--kb-muted);
}

/* Cart — mobile-friendly line items */
.kb-cart-line {
  overflow: hidden;
}
.kb-cart-line-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.kb-cart-line-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}
.kb-cart-line-media:hover .kb-cart-line-img {
  opacity: 0.92;
}
.kb-cart-line-title:hover {
  color: var(--kb-green) !important;
}
.kb-cart-line-info {
  flex: 1 1 120px;
  min-width: 0;
}
.kb-cart-line-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  max-width: 100%;
}
.kb-cart-qty-input {
  width: 4rem;
  min-width: 3.5rem;
}
.kb-cart-qty-form,
.kb-cart-remove-form {
  flex-shrink: 0;
}
@media (max-width: 575.98px) {
  .kb-cart-line-inner {
    align-items: flex-start;
  }
  .kb-cart-line-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.25rem;
    border-top: 1px solid var(--kb-border);
    margin-top: 0.25rem;
  }
}

.home-ad-sidebar img,
.home-ad-hero img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.home-ad-hero { border: 1px solid var(--kb-border); }

/* Voice play on product cards only (icon circle) */
.kb-voice-btn.btn-voice-play {
  width: 32px;
  height: 32px;
  padding: 0;
}

.kb-listing-map { height: 220px; width: 100%; background: #e8ece9; border: 1px solid var(--kb-border); z-index: 1; }
@media (min-width: 768px) { .kb-listing-map { height: 280px; } }
.leaflet-control-attribution {
  display: none !important;
}
.leaflet-container { font-family: var(--font-body); }
#locationSearchResults { max-height: 160px; overflow-y: auto; }
.kb-faq-prefooter { border-top: 1px solid var(--kb-border); background: rgba(255,255,255,.5); }
.kb-faq-accordion .accordion-item { border-color: var(--kb-border); border-radius: var(--kb-radius); overflow: hidden; margin-bottom: 0.5rem; }
.kb-voice-native { width: 100%; margin-top: 0.5rem; max-height: 48px; }
.kb-voice-wrap { position: relative; }
/* Category grid (home + marketplace) */
.kb-categories-grid .category-tile {
  display: block;
  width: 100% !important;
  min-height: 108px;
  flex-shrink: unset;
}
@media (min-width: 768px) {
  .kb-categories-grid .category-tile { min-height: 120px; }
  .kb-categories-grid .category-tile-name {
    font-size: 1.35rem;
    line-height: 1.15;
  }
}
@media (max-width: 767px) {
  .kb-categories-grid .category-tile {
    width: 100% !important;
    min-height: 88px;
  }
}

/* Home mobile categories: 5×2 grid + horizontal carousel */
.kb-categories-primary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
}
.kb-categories-carousel-wrap {
  overflow: hidden;
}
.kb-categories-carousel {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}
.kb-categories-carousel::-webkit-scrollbar {
  display: none;
}
.kb-categories-carousel .category-tile {
  flex: 0 0 72px;
  width: 72px !important;
  min-height: 72px;
  scroll-snap-align: start;
}
.kb-categories-see-more {
  color: var(--kb-primary-dark);
  font-weight: 600;
  text-decoration: none !important;
}
.kb-categories-see-more[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
  display: inline-block;
}
.kb-categories-expanded-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.category-tile--compact {
  width: 100% !important;
  min-height: 68px !important;
  border-radius: 10px;
}
.category-tile--compact .category-tile-body {
  padding: 0.35rem 0.2rem;
  justify-content: flex-end;
}
.category-tile--compact .category-tile-emoji {
  font-size: 1.1rem;
  margin-bottom: 0.1rem;
}
.category-tile--compact .category-tile-name {
  font-size: clamp(0.58rem, 2.35vw, 0.72rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}
.kb-categories-primary .category-tile--compact {
  min-height: 80px !important;
}
.kb-categories-primary .category-tile--compact .category-tile-body {
  justify-content: center;
  padding: 0.3rem 0.15rem;
}
.kb-categories-primary .category-tile--compact .category-tile-name {
  font-size: clamp(0.56rem, 2.5vw, 0.68rem);
}
.kb-categories-expanded-grid .category-tile--compact {
  min-height: 88px !important;
}
.kb-categories-expanded-grid .category-tile--compact .category-tile-name {
  font-size: clamp(0.85rem, 3.5vw, 1rem);
  line-height: 1.15;
}
.kb-categories-expanded-grid .category-tile--compact .category-tile-body {
  justify-content: center;
}
.kb-categories-carousel .category-tile--compact .category-tile-name {
  font-size: 0.65rem;
  line-height: 1.1;
}
.category-tile--compact .category-tile-caption {
  padding: 0.15rem 0.08rem;
  width: 100%;
  box-sizing: border-box;
}

/* ——— Product detail page (premium) ——— */
.kb-product-page { padding-bottom: calc(9.5rem + env(safe-area-inset-bottom, 0)); }
@media (min-width: 992px) {
  .kb-product-page { padding-bottom: 2rem; }
}
.kb-product-buybox { position: relative; }
@media (min-width: 992px) {
  .kb-product-buybox { position: sticky; top: 5.5rem; }
}
.kb-product-page-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.2;
  color: var(--kb-fg-dark);
}
.kb-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 104, 55, 0.1);
  color: var(--kb-primary);
}
.kb-pill--info { background: rgba(13, 110, 253, 0.12); color: #0a58ca; }
.kb-pill--hot { background: rgba(184, 134, 11, 0.15); color: var(--kb-gold); }

.kb-rating-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}
.kb-stars-display {
  display: inline-flex;
  gap: 2px;
  line-height: 1;
}
.kb-stars-display .bi-star-fill {
  font-size: 0.95rem;
  color: #ddd;
}
.kb-stars-display .bi-star-fill.filled { color: #f0b429; }
.kb-stars-display--lg .bi-star-fill { font-size: 1.15rem; }
.kb-stars-display--sm .bi-star-fill { font-size: 0.8rem; }
.kb-rating-score {
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1rem;
}
.kb-rating-reviews-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--kb-primary);
  text-decoration: none;
}
.kb-rating-reviews-link:hover { text-decoration: underline; }

.kb-price-block { line-height: 1.1; }
.kb-price-main {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  background: linear-gradient(135deg, #9a7420, #d4a84a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kb-price-unit { font-size: 0.95rem; color: var(--kb-muted); font-weight: 500; }
.kb-price-old { display: block; font-size: 0.9rem; color: var(--kb-muted); margin-top: 0.15rem; }

.kb-seller-strip {
  padding: 0.75rem;
  border-radius: var(--kb-radius);
  background: rgba(0, 104, 55, 0.05);
  border: 1px solid var(--kb-border);
}
.kb-seller-strip-meta { font-size: 0.85rem; color: var(--kb-muted); }
.kb-seller-name {
  display: inline-block;
  font-weight: 700;
  color: var(--kb-primary);
  text-decoration: none;
  margin-top: 0.15rem;
}
.kb-product-desc { color: #3d4f46; line-height: 1.55; margin-bottom: 0; }

.kb-voice-compact {
  padding: 0.75rem;
  border-radius: var(--kb-radius);
  background: var(--kb-bg);
  border: 1px solid var(--kb-border);
}
.kb-voice-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.kb-voice-compact-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--kb-fg-dark);
  min-width: 0;
  flex: 1;
}
.kb-voice-listen-btn,
.kb-voice-compact .btn-voice-play {
  flex-shrink: 0;
  width: auto !important;
  height: auto !important;
  min-height: 38px;
  padding: 0.5rem 1rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #004d28, #3d9a66);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 104, 55, 0.2);
}
.kb-voice-listen-btn .bi-play-fill,
.kb-voice-compact .btn-voice-play .bi-play-fill {
  font-size: 1rem;
  line-height: 1;
}
.kb-voice-listen-btn .voice-btn-label,
.kb-voice-compact .voice-btn-label {
  display: inline;
  line-height: 1;
}
.kb-voice-native--show,
.kb-voice-compact .kb-voice-native.kb-voice-native--show {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  max-height: 52px;
}
.kb-voice-hint {
  font-size: 0.75rem;
  line-height: 1.35;
}
.kb-product-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.kb-product-share .btn {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}
.kb-voice-compact .kb-voice-native {
  width: 100%;
  margin-top: 0.65rem;
  max-height: 44px;
  border-radius: 8px;
}

.kb-owner-notice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: var(--kb-radius);
  background: rgba(184, 134, 11, 0.12);
  border: 1px solid rgba(184, 134, 11, 0.35);
  color: var(--kb-fg-dark);
}
.kb-owner-notice > .bi { font-size: 1.35rem; color: var(--kb-gold); flex-shrink: 0; }

.kb-contact-seller {
  padding: 0.85rem;
  border-radius: var(--kb-radius);
  background: rgba(0, 104, 55, 0.06);
  border: 1px solid rgba(0, 104, 55, 0.15);
}
.kb-contact-seller-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--kb-primary);
  margin: 0;
}
.kb-contact-seller-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.kb-contact-seller-btns .btn {
  font-weight: 600;
  min-height: 42px;
}

.kb-product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.kb-product-actions--owner {
  grid-template-columns: 1fr;
}
.kb-product-actions .kb-action-form { margin: 0; }
.kb-product-actions .btn {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 0.5rem;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.kb-product-share .btn,
.kb-product-actions .js-product-copy-link {
  grid-column: 1 / -1;
}
.kb-product-actions--owner .btn {
  grid-column: 1 / -1;
}
.kb-product-actions #copyLinkFeedback {
  grid-column: 1 / -1;
}

.kb-product-accordion { margin-top: 0.25rem; }
.kb-product-accordion .accordion-item {
  border: 1px solid var(--kb-border);
  border-radius: var(--kb-radius);
  overflow: hidden;
  background: #fff;
}
.kb-product-accordion .accordion-header { margin: 0; }
.kb-product-accordion .accordion-button {
  position: relative;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85rem 2.75rem 0.85rem 0.85rem;
  background: #fff;
  box-shadow: none;
  color: var(--kb-fg-dark);
  display: flex;
  align-items: center;
  width: 100%;
}
.kb-product-accordion .accordion-button:not(.collapsed) {
  background: rgba(0, 104, 55, 0.06);
  color: var(--kb-primary);
}
.kb-product-accordion .accordion-button::after {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  background-size: 1.1rem;
}
.kb-product-accordion .accordion-button.collapsed::after {
  transform: translateY(-50%) rotate(0deg);
}
.kb-accordion-bid-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.kb-product-accordion .accordion-body {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid var(--kb-border);
}

/* Gallery — tight, no excess height */
.kb-product-gallery { border: none; }
.kb-product-carousel .kb-gallery-main,
.kb-product-carousel .carousel-item img,
.kb-gallery-single {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: min(52vh, 420px);
  object-fit: cover;
  display: block;
}
.kb-gallery-counter {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 3;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.kb-gallery-thumbs {
  border-top: 1px solid var(--kb-border);
  background: #fff;
}
.kb-gallery-thumb {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.7;
  cursor: pointer;
  background: #fff;
}
.kb-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-gallery-thumb.active { border-color: var(--kb-primary); opacity: 1; }
.kb-product-video { max-height: 220px; background: #111; border-radius: 8px; }

/* Reviews */
.kb-reviews-section { scroll-margin-top: 5.5rem; }
.kb-reviews-summary { text-align: center; padding: 0.5rem 0; }
@media (min-width: 992px) {
  .kb-reviews-summary { text-align: left; }
}
.kb-reviews-big-score {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--kb-fg-dark);
}
.kb-star-picker {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
}
@media (min-width: 992px) {
  .kb-star-picker { justify-content: flex-start; }
}
.kb-star-pick {
  border: none;
  background: none;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s;
}
.kb-star-pick .bi-star-fill {
  font-size: 1.75rem;
  color: #e0e0e0;
  transition: color 0.15s;
}
.kb-star-pick.is-on .bi-star-fill,
.kb-star-pick:hover .bi-star-fill { color: #f0b429; }
.kb-star-pick:active { transform: scale(1.1); }
.kb-review-list { display: flex; flex-direction: column; gap: 0.65rem; }
.kb-review-item {
  padding: 0.85rem 1rem;
  border-radius: var(--kb-radius);
  border: 1px solid var(--kb-border);
  background: #fff;
}
.kb-review-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.kb-review-author { font-size: 0.9rem; }
.kb-review-text { font-size: 0.88rem; color: #4a5c52; }
.kb-review-date { font-size: 0.75rem; color: var(--kb-muted); }

/* Mobile sticky actions */
.kb-product-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(3.75rem + env(safe-area-inset-bottom, 0));
  z-index: 1065;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--kb-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.kb-product-mobile-bar form {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}
.kb-product-mobile-bar .btn {
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.5rem 0.35rem;
  min-height: 44px;
  touch-action: manipulation;
  width: 100%;
}
.kb-product-mobile-bar .kb-mobile-bar-cart { min-width: 0; }
.kb-product-mobile-bar .kb-mobile-icon-btn {
  width: 44px;
  min-width: 44px;
  flex-shrink: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.kb-product-mobile-bar--contact .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* Related products horizontal rail (product / service / worker pages) */
.kb-related-section {
  background: linear-gradient(180deg, transparent 0%, rgba(249, 247, 240, 0.65) 100%);
}
.kb-related-rail-wrap {
  position: relative;
}
.kb-related-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 0.25rem 0.15rem 0.75rem;
  scrollbar-width: thin;
}
.kb-related-rail::-webkit-scrollbar {
  height: 6px;
}
.kb-related-rail::-webkit-scrollbar-thumb {
  background: rgba(0, 77, 40, 0.25);
  border-radius: 999px;
}
.kb-product-card--rail {
  flex: 0 0 168px;
  width: 168px;
  max-width: 72vw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
@media (min-width: 576px) {
  .kb-product-card--rail {
    flex: 0 0 188px;
    width: 188px;
  }
}
@media (min-width: 992px) {
  .kb-product-card--rail {
    flex: 0 0 210px;
    width: 210px;
  }
}
.kb-related-rail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--kb-primary-dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  align-items: center;
  justify-content: center;
}
.kb-related-rail-arrow--prev { left: -6px; }
.kb-related-rail-arrow--next { right: -6px; }
.kb-related-rail-wrap .kb-related-rail {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
@media (min-width: 768px) {
  .kb-related-rail-wrap .kb-related-rail {
    margin: 0 2rem;
  }
}
.kb-related-rail--workers .kb-related-worker-card {
  width: 160px;
}
@media (min-width: 768px) {
  .kb-related-rail--workers .kb-related-worker-card {
    width: 180px;
  }
}

/* Marketplace card multi-photo carousel */
.kb-card-carousel {
  position: relative;
  overflow: hidden;
  background: #e8ece9;
}
.kb-card-carousel-inner {
  position: relative;
  aspect-ratio: 1;
}
.kb-card-carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.kb-card-carousel-img.is-active,
.kb-card-carousel-slide.is-active {
  opacity: 1;
  z-index: 1;
}
.kb-card-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.kb-card-carousel-slide--video .kb-card-carousel-img {
  position: relative;
  inset: auto;
  opacity: 1;
  pointer-events: none;
}
.kb-card-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  z-index: 2;
  pointer-events: none;
}
.kb-card-video-thumb {
  position: relative;
}
.kb-keep-media img {
  aspect-ratio: 1;
  object-fit: cover;
}
.kb-keep-media .form-check-input {
  vertical-align: middle;
}
.kb-bid-listing-thumb {
  object-fit: cover;
}
.kb-seller-bids {
  background: #f8faf8;
}

/* Notifications list + detail */
.kb-notification-card {
  display: block;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.kb-notification-card:hover {
  box-shadow: 0 4px 16px rgba(0, 77, 40, 0.1);
}
.kb-notification-card--unread {
  border: 2px solid var(--kb-primary-light, #3d9a66) !important;
}
.kb-notification-card-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.kb-notification-card-body {
  flex: 1;
  min-width: 0;
}
.kb-notification-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}
.kb-notification-card-actions .btn {
  border-radius: 8px !important;
  white-space: nowrap;
  padding: 0.35rem 0.65rem !important;
  font-size: 0.72rem !important;
  font-weight: 600;
  line-height: 1.2;
  min-height: auto !important;
  width: auto;
  max-width: 7.5rem;
  box-shadow: none;
}
.kb-notification-detail-actions .btn {
  border-radius: 8px;
}
.kb-notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: #e8f5ee;
  color: var(--kb-primary-dark, #004d28);
}
.kb-notification-icon--bid {
  background: #fff8e6;
  color: #9a7420;
}

/* Seller dashboard orders table on mobile */
.kb-sell-orders-table th,
.kb-sell-orders-table td {
  vertical-align: middle;
}
@media (max-width: 575px) {
  .kb-sell-orders-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }
}
.kb-gallery-video {
  max-height: 70vh;
  background: #000;
}
.kb-gallery-thumb {
  position: relative;
}
.kb-gallery-thumb--video .kb-gallery-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.25rem;
}
.kb-card-carousel-prev,
.kb-card-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--kb-fg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.kb-card-carousel-prev { left: 6px; }
.kb-card-carousel-next { right: 6px; }
.kb-photo-count {
  position: absolute;
  bottom: 6px;
  left: 6px;
  z-index: 4;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}
.kb-card-dots {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 4;
  display: flex;
  gap: 3px;
}
.kb-card-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}
.kb-card-dot.active { background: #fff; transform: scale(1.2); }
.kb-product-card .kb-product-media { position: relative; }
.kb-voice-play-lg {
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-voice-play.is-playing,
.kb-voice-btn.is-playing {
  background: var(--kb-primary-dark) !important;
  box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.25);
  animation: kb-voice-pulse 1.2s ease-in-out infinite;
}
@keyframes kb-voice-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.kb-voice-now-playing {
  animation: kb-voice-pulse 1.2s ease-in-out infinite;
}

/* Sell form — voice recorder */
.kb-voice-recorder {
  background: #f8faf8;
  border-color: var(--kb-border) !important;
}
.kb-voice-recorder.is-recording {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}
.kb-voice-timer {
  min-width: 2.5rem;
  color: var(--kb-primary);
  font-size: 1rem;
}
.kb-voice-btn-record {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.kb-voice-wave {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 28px;
}
.kb-voice-recorder.is-recording .kb-voice-wave {
  display: flex;
}
.kb-voice-wave span {
  width: 4px;
  height: 8px;
  background: var(--kb-danger, #dc3545);
  border-radius: 2px;
  animation: kb-voice-bar 0.6s ease-in-out infinite;
}
.kb-voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.kb-voice-wave span:nth-child(3) { animation-delay: 0.2s; }
.kb-voice-wave span:nth-child(4) { animation-delay: 0.15s; }
.kb-voice-wave span:nth-child(5) { animation-delay: 0.25s; }
@keyframes kb-voice-bar {
  0%, 100% { height: 8px; }
  50% { height: 24px; }
}
.kb-voice-status.text-success { color: var(--kb-primary) !important; }

/* WhatsApp-style messenger */
.messenger-shell {
  min-height: calc(100vh - 160px);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.messenger-row {
  min-height: 65vh;
  flex: 1;
}
.messenger-sidebar {
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 65vh;
  max-height: calc(100vh - 140px);
}
.messenger-sidebar-head {
  background: linear-gradient(135deg, #1f4a38, #3d9a66);
  flex-shrink: 0;
}
.messenger-sidebar-sub { color: rgba(255,255,255,.8) !important; }
.messenger-chat-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #f7f9f8;
}
.messenger-chat-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e8ece9;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.messenger-chat-item:hover,
.messenger-chat-item.active {
  background: #e8f5e9;
}
.messenger-chat-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.messenger-chat-top,
.messenger-chat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.messenger-chat-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.messenger-chat-time {
  font-size: 0.7rem;
  color: #6b7c72;
  flex-shrink: 0;
}
.messenger-chat-product {
  font-size: 0.75rem;
  color: #2f7a52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0.15rem 0;
}
.messenger-chat-preview {
  font-size: 0.8rem;
  color: #6b7c72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.messenger-chat-unread {
  background: #25d366;
  color: #fff;
  font-size: 0.7rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  flex-shrink: 0;
}
.messenger-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--kb-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 2px solid #e8ece9;
}
.messenger-thread-col {
  min-height: 65vh;
  max-height: calc(100vh - 140px);
  padding: 0 !important;
}
.messenger-thread {
  background: #e5ddd5;
  min-height: 100%;
}
.messenger-thread-head {
  background: #f0f4f1;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid #dde5e0;
  flex-shrink: 0;
}
.messenger-thread-user { line-height: 1.3; }
.messenger-call-btn { white-space: nowrap; }
.messenger-product-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: #fff;
  border-bottom: 1px solid #dde5e0;
  text-decoration: none;
  flex-shrink: 0;
}
.messenger-product-bar img {
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}
.messenger-messages {
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  padding: 1rem;
}
.messenger-msg {
  display: flex;
  margin-bottom: 0.65rem;
  clear: both;
}
.messenger-msg--me { justify-content: flex-end; }
.messenger-msg--them { justify-content: flex-start; }
.messenger-bubble {
  max-width: min(85%, 420px);
  padding: 0.5rem 0.7rem 0.35rem;
  border-radius: 0.55rem;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
  word-wrap: break-word;
}
.messenger-bubble-text {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 0.2rem;
}
.messenger-bubble-time {
  font-size: 0.65rem;
  color: #5a6b62;
  text-align: right;
  display: block;
  line-height: 1.2;
  margin-top: 0.15rem;
  white-space: nowrap;
}
.messenger-msg--me .messenger-bubble {
  background: #dcf8c6;
  border-top-right-radius: 0.12rem;
}
.messenger-msg--them .messenger-bubble {
  background: #fff;
  border-top-left-radius: 0.12rem;
}
.messenger-compose {
  background: #f0f4f1;
  padding: 0.65rem 1rem;
  border-top: 1px solid #dde5e0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}
.messenger-compose .form-control {
  border-radius: 999px;
  border: 1px solid #cdd8d2;
}
.messenger-send-btn,
.messenger-voice-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.messenger-voice-btn.is-recording {
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
  animation: kb-voice-pulse 1s ease infinite;
}
.messenger-voice-btn.has-voice {
  border-color: var(--kb-primary);
  color: var(--kb-primary);
}
.kb-chat-voice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 160px;
  max-width: 280px;
}
.kb-chat-voice-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kb-chat-voice-label {
  opacity: 0.85;
  font-weight: 600;
}
.kb-chat-voice-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kb-chat-voice-native {
  display: none;
  width: 100%;
  max-height: 42px;
  border-radius: 8px;
}
.kb-chat-voice-native.kb-voice-native--show {
  display: block;
}
@media (max-width: 991.98px) {
  .kb-chat-voice {
    max-width: 100%;
  }
  .kb-chat-voice-row {
    display: none;
  }
  .kb-chat-voice-native {
    display: block;
    max-height: 44px;
  }
}
.messenger-msg--me .kb-chat-voice-btn {
  background: rgba(255, 255, 255, 0.3);
}
.messenger-msg--them .kb-chat-voice-btn {
  background: rgba(0, 77, 40, 0.12);
  color: var(--kb-primary-dark);
}
.kb-chat-voice-wave {
  flex: 1;
  height: 24px;
  background: linear-gradient(90deg, currentColor 2px, transparent 2px) 0 0 / 6px 100%;
  opacity: 0.35;
}
.messenger-voice-hint {
  font-size: 0.7rem;
  background: #f0f4f1;
}
@keyframes kb-voice-pulse {
  50% { transform: scale(1.08); }
}
.messenger-empty { background: #f7f9f8; }
.messenger-nav-btn .bi-whatsapp { line-height: 1; }
@media (max-width: 991.98px) {
  .messenger-shell { max-height: none; min-height: calc(100vh - 100px); }
  .messenger-sidebar,
  .messenger-thread-col { max-height: none; min-height: calc(100vh - 120px); }
  .messenger-messages { min-height: 50vh; }
}
.messenger-fab {
  position: fixed;
  z-index: 1045;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  text-decoration: none;
  touch-action: manipulation;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow 0.2s, transform 0.15s;
}
.messenger-fab:active {
  cursor: grabbing;
}
.messenger-fab--draggable.kb-fab-pos-br {
  bottom: calc(7.25rem + env(safe-area-inset-bottom, 0px));
  right: 16px;
  left: auto;
  top: auto;
}
.messenger-fab--draggable.kb-fab-pos-bl {
  bottom: calc(7.25rem + env(safe-area-inset-bottom, 0px));
  left: 16px;
  right: auto;
  top: auto;
}
.messenger-fab--draggable.kb-fab-pos-tr {
  top: calc(5rem + env(safe-area-inset-top, 0px));
  right: 16px;
  left: auto;
  bottom: auto;
}
.messenger-fab--draggable.kb-fab-pos-tl {
  top: calc(5rem + env(safe-area-inset-top, 0px));
  left: 16px;
  right: auto;
  bottom: auto;
}
.messenger-fab.kb-fab-dragging {
  cursor: grabbing;
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}
.kb-marketplace-filters .form-label {
  font-weight: 600;
  color: var(--kb-muted, #5a6b62);
}
/* Image crop modal (Cropper.js) */
.image-crop-stage {
  max-height: min(60vh, 480px);
  background: #1a1a1a;
  border-radius: var(--kb-radius);
  overflow: hidden;
}
.image-crop-stage .cropper-container,
.image-crop-stage .cropper-wrap-box,
.image-crop-stage .cropper-canvas {
  max-height: min(60vh, 480px) !important;
}
.image-crop-stage img {
  max-width: 100%;
  display: block;
}
.crop-preview-thumb img {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.messenger-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #d04a3a;
  color: #fff;
  font-size: 11px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Admin dashboard */
.admin-body { background: #ebe6dc; }
.admin-wrap { min-height: 100vh; }
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #1e2f28 0%, #2a4038 100%);
  color: #e8e4d8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.admin-nav .nav-link {
  color: rgba(232, 228, 216, 0.85);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-weight: 500;
}
.admin-nav .nav-link:hover,
.admin-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.admin-nav .nav-link.active { background: rgba(47, 122, 82, 0.45); }
.admin-main { background: var(--kb-bg); min-width: 0; }
.admin-topbar {
  background: rgba(252, 250, 246, 0.95);
  border-bottom: 1px solid var(--kb-border);
}
.admin-content main { padding-bottom: 1rem !important; }
@media (max-width: 991.98px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; min-height: auto; }
}

/* ——— Mobile responsive (client reference) ——— */
@media (max-width: 767.98px) {
  .kb-hero-bg::after {
    background: linear-gradient(
      105deg,
      rgba(249, 247, 240, 0.78) 0%,
      rgba(249, 247, 240, 0.45) 40%,
      rgba(249, 247, 240, 0.18) 62%,
      rgba(249, 247, 240, 0.05) 82%,
      transparent 100%
    );
  }
  .kb-hero {
    min-height: auto;
  }
  .kb-hero-pill {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
    max-width: 100%;
  }
  .kb-hero-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .kb-hero-lead {
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 100%;
    color: #1a2e24;
    font-weight: 500;
  }
  .kb-hero-urdu {
    font-size: 1.15rem;
    margin-top: 0.5rem;
  }
  .kb-hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  .kb-section-title {
    font-size: 1.2rem;
  }
  .kb-view-all {
    font-size: 0.85rem;
  }
  /* Do not force fixed width on grid tiles — prevents clipped labels */
  .kb-categories-home .category-tile,
  .kb-categories-grid .category-tile {
    width: 100% !important;
    max-width: 100%;
    min-height: 86px;
  }
  .kb-categories-grid .category-tile {
    min-height: 96px;
  }
  .kb-categories-grid .category-tile-body {
    justify-content: center;
    padding: 0.4rem 0.25rem;
  }
  .kb-categories-grid .category-tile-name {
    font-size: clamp(0.72rem, 2.8vw, 0.95rem);
    line-height: 1.12;
  }
  @media (max-width: 399.98px) {
    .kb-categories-primary {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  .kb-product-title { font-size: 0.82rem; }
  .kb-product-body { padding: 0.65rem; }
  .kb-product-price { font-size: 0.92rem; }
  .kb-worker-card { padding: 0.85rem; }
  .kb-prefooter-cta {
    padding: 1.25rem !important;
    text-align: center;
  }
  .kb-prefooter-title { font-size: 1.35rem; }
  .kb-prefooter-cta .btn { width: 100%; }
  .container-xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .kb-page .container-xl.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

@media (max-width: 575.98px) {
  .kb-hero-title {
    font-size: clamp(1.65rem, 7.5vw, 2.1rem);
  }
  .row.row-cols-2 { --bs-gutter-x: 0.65rem; }
  .kb-badge { font-size: 0.58rem; padding: 0.15rem 0.4rem; }
}

/* Profile stat tiles */
.kb-stat-tile {
  display: block;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: var(--kb-surface, #f8faf8);
  border: 1px solid rgba(0, 80, 40, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}
a.kb-stat-tile:hover {
  border-color: var(--kb-green, #1b5e20);
  box-shadow: 0 4px 12px rgba(27, 94, 32, 0.12);
}
.kb-stat-tile--static {
  cursor: default;
}
.kb-profile-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  max-width: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #eef2f0;
  border: 2px solid var(--kb-border, #e5e0d4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kb-profile-avatar img,
img.kb-profile-avatar,
.kb-settings-avatar img,
img.kb-settings-avatar {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.kb-profile-avatar-emoji {
  width: 100%;
  height: 100%;
  font-size: 2rem;
  line-height: 1;
}
.kb-settings-avatar,
img.kb-settings-avatar {
  width: 80px;
  height: 80px;
  min-width: 80px;
  max-width: 80px;
}
.kb-profile-avatar--lg {
  width: 96px;
  height: 96px;
  font-size: 2.5rem;
}
.kb-profile-avatar-img {
  object-fit: cover;
}
.kb-worker-hero-avatar,
.kb-worker-avatar-emoji {
  font-size: 4rem;
  line-height: 1;
  display: inline-block;
}
.kb-worker-card .kb-worker-avatar-emoji {
  font-size: 2rem;
}
.kb-worker-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--kb-border);
  display: block;
  margin: 0 auto;
}
.kb-worker-photo--lg {
  width: 120px;
  height: 120px;
}
.kb-worker-photo--card {
  width: 64px;
  height: 64px;
}
.kb-worker-photo-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
}
.kb-worker-card-link:hover .card-kb {
  border-color: var(--kb-green, #1b5e20);
}

/* Unified listing form — category picker */
.kb-listing-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 0.5rem;
}
.kb-listing-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 96px;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--kb-border, #dee2e6);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.kb-listing-cat-btn--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.62) 100%);
  border-radius: inherit;
  pointer-events: none;
}
.kb-listing-cat-btn:hover,
.kb-listing-cat-btn.is-active {
  border-color: var(--kb-green, #1b5e20);
  box-shadow: 0 4px 14px rgba(0, 77, 40, 0.12);
}
.kb-listing-cat-btn:not(.kb-listing-cat-btn--image):hover,
.kb-listing-cat-btn:not(.kb-listing-cat-btn--image).is-active {
  background: rgba(27, 94, 32, 0.06);
}
.kb-listing-cat-btn.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--kb-green, #1b5e20);
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}
.kb-listing-cat-icon {
  font-size: 1.75rem;
  line-height: 1;
}
.kb-listing-cat-label {
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  color: #333;
}
.kb-listing-cat-btn--image .kb-listing-cat-label {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.kb-badge--stock {
  background: #0d6efd;
  color: #fff;
}
.kb-badge--booked {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #ffc107;
  color: #212529;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-weight: 700;
}
.kb-worker-card--booked {
  opacity: 0.92;
}
.kb-pill--stock {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}
