/* =========================================================
   NIGERBIZZ — Jiji Uganda Inspired Design System
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Jiji Colors */
  --primary-green: #3db83a;
  --primary-green-hover: #32962f;
  --primary-green-light: #eaf8ea;

  --accent-orange: #ffa900;
  --accent-orange-hover: #e09500;
  --accent-orange-light: #fff5e6;

  /* Aliasing old variables to avoid breaking existing code styles */
  --blue-900: #1a202c;
  --blue-700: #3db83a;
  --blue-600: #3db83a;
  --blue-100: #eaf8ea;

  --green-800: #32962f;
  --green-600: #3db83a;
  --green-500: #3db83a;
  --green-100: #eaf8ea;

  --amber-600: #ffa900;
  --amber-100: #fff5e6;

  --ink-900: #1a202c;
  --ink-700: #4a5568;
  --grey-600: #718096;
  --grey-400: #a0aec0;
  --grey-200: #e2e8f0;
  --grey-100: #f7fafc;

  --cream: #f4f4f5; /* Jiji's background color */
  --surface: #ffffff;

  /* Fonts */
  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-data: 'Inter', sans-serif;

  /* Borders & Shadows */
  --notch: 0px; /* Disable the notched corner */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-pop: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; width: 100%; min-width: 0; box-sizing: border-box; }

/* Focus outlines */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--primary-green);
  outline-offset: 2px;
}

/* =========================================================
   Typography & Headers
   ========================================================= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.2;
  margin: 0;
}
.price { font-weight: 700; color: var(--primary-green) !important; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  padding: 10px 18px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* The Sell Button (Jiji Amber/Orange) */
.btn-primary, .btn-sell {
  background: var(--accent-orange) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(255, 169, 0, 0.25) !important;
}
.btn-primary:hover, .btn-sell:hover {
  background: var(--accent-orange-hover) !important;
  box-shadow: 0 6px 16px rgba(255, 169, 0, 0.35) !important;
}

/* Green Buttons */
.btn-secondary, .btn-green {
  background: var(--primary-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 184, 58, 0.2);
}
.btn-secondary:hover, .btn-green:hover {
  background: var(--primary-green-hover);
}

.btn-outline {
  background: transparent; color: var(--primary-green); border: 1.5px solid var(--primary-green);
}
.btn-outline:hover {
  background: var(--primary-green-light);
}

.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--grey-100); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* =========================================================
   Header (Jiji Style: Green top elements or white header with green accents)
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid var(--grey-200);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand img,
.brand-logo { height: 42px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand-word .bz { color: var(--primary-green); }
.brand-word .ng { color: var(--accent-orange); }

.omnisearch {
  display: flex; align-items: stretch;
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  max-width: 600px; width: 100%;
  margin: 0 auto;
  overflow: hidden;
  transition: all 0.2s ease;
}
.omnisearch:focus-within {
  border-color: var(--primary-green);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(61, 184, 58, 0.15);
}
.omnisearch select {
  border: none; background: transparent;
  padding: 0 12px; font-size: 13.5px; color: var(--ink-700);
  border-right: 1px solid var(--grey-200);
  max-width: 140px;
  outline: none;
}
.omnisearch input {
  flex: 1; border: none; outline: none; padding: 10px 14px; font-size: 14px; background: transparent; min-width: 0;
}
.omnisearch button {
  border: none; background: var(--primary-green); color: #fff; padding: 0 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.omnisearch button:hover { background: var(--primary-green-hover); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink-700);
  position: relative;
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--grey-100); }
.icon-btn .dot {
  position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-orange); border: 2px solid var(--surface);
}

.nav-strip {
  display: flex; gap: 20px; padding: 8px 16px 8px;
  overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--grey-100);
  max-width: var(--container);
  margin: 0 auto;
}
.nav-strip::-webkit-scrollbar { display: none; }
.nav-strip a {
  font-size: 13px; color: var(--ink-700); font-weight: 500; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav-strip a:hover, .nav-strip a.active { color: var(--primary-green); border-color: var(--primary-green); }

.mobile-toggle { display: none; background: none; border: none; padding: 6px; }

/* =========================================================
   Homepage Jiji Layout (Two-Column Desktop)
   ========================================================= */
.home-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 20px;
  min-width: 0;
  max-width: 100%;
}
.home-main {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 960px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .home-sidebar { display: none; }
}

.home-sidebar {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--grey-200);
  padding: 12px;
  box-shadow: var(--shadow-card);
}
.sidebar-cat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  padding: 8px 12px 14px;
  border-bottom: 1px solid var(--grey-100);
  margin-bottom: 8px;
}
.sidebar-cat-list { display: flex; flex-direction: column; position: relative; }
.sidebar-cat-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  color: var(--ink-700); font-weight: 500; font-size: 13.5px;
  border-bottom: 1px solid var(--grey-100); text-decoration: none;
  transition: all 0.2s ease; position: static; /* Position static so flyout anchors to list */
}
.sidebar-cat-item:last-child { border-bottom: none; }
.sidebar-cat-item svg { color: var(--grey-400); transition: color 0.2s; }
.sidebar-cat-item:hover { background: var(--grey-100); color: var(--primary-green); padding-left: 20px; }
.sidebar-cat-item:hover svg { color: var(--primary-green); }

/* Jiji Mega Menu Flyout */
.sidebar-flyout {
  position: absolute; left: 100%; top: 0; bottom: 0; min-width: 320px;
  background: #fff; border-left: 1px solid var(--grey-200); box-shadow: 4px 4px 10px rgba(0,0,0,0.05);
  z-index: 10; display: none; padding: 20px; border-radius: 0 var(--radius-md) var(--radius-md) 0;
  overflow-y: auto;
}
.sidebar-cat-item:hover .sidebar-flyout { display: block; cursor: default; }
.flyout-title { font-weight: 700; color: var(--ink-900); margin-bottom: 16px; font-size: 15px; border-bottom: 2px solid var(--primary-green); display: inline-block; padding-bottom: 4px; }
.flyout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.flyout-link { display: block; font-size: 13px; color: var(--ink-700); text-decoration: none; }
.flyout-link:hover { color: var(--primary-green); font-weight: 600; }

/* Hero Section inside home-layout */
.hero-slider-section {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 180px;
  box-shadow: var(--shadow-card);
  background: #1b4332;
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slider-section .hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-slider-section .hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.hero-slider-section .hero-content-overlay {
  position: absolute; inset: 0; z-index: 2;
  padding: 18px 24px; display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  pointer-events: none;
}
.hero-slider-section .hero-content-overlay h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.hero-slider-section .hero-content-overlay p {
  font-size: 13px;
  color: rgba(255,255,255,0.95);
  margin: 4px 0 0;
}
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--ink-900);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.hero-nav.prev { left: 10px; }
.hero-nav.next { right: 10px; }
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.hero-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
}
.hero-dots button.active {
  background: #fff;
  width: 18px;
  border-radius: 4px;
}
[dir="rtl"] .hero-nav.prev { left: auto; right: 10px; }
[dir="rtl"] .hero-nav.next { right: auto; left: 10px; }

.hero-slider-section h1 {
  font-size: clamp(24px, 3.5vw, 36px);
  color: #fff;
  max-width: 500px;
}
.hero-slider-section h1 span {
  color: var(--accent-orange);
}
.hero-slider-section p {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  max-width: 420px;
  margin: 8px 0 0 0;
}

/* =========================================================
   Marketplace Listing Cards (Jiji Style)
   ========================================================= */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex; flex-direction: column;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.card::before { display: none; } /* Remove notch styling */

.card-media { position: relative; aspect-ratio: 4/3; background: var(--grey-100); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 4px;
  color: #fff;
}
.card-badge.new { background: var(--primary-green); }
.card-badge.used { background: var(--ink-700); }

.fav-btn {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-600);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}
.fav-btn:hover { transform: scale(1.1); color: #E1483C; }
.fav-btn.active { color: #E1483C; fill: #E1483C; }
.fav-btn svg { width: 16px; height: 16px; transition: fill 0.2s; }

.card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-price { font-size: 16px; font-weight: 700; color: var(--primary-green); }
.card-title {
  font-size: 13.5px; color: var(--ink-900); font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4; min-height: 2.8em;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--grey-600); margin-top: auto; padding-top: 8px;
  border-top: 1px solid var(--grey-100);
}
.card-meta .loc { display: flex; align-items: center; gap: 4px; }
.card-meta svg { width: 12px; height: 12px; color: var(--grey-400); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* =========================================================
   Sections scaffolding
   ========================================================= */
.section { padding: 36px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: 22px; font-weight: 700; }
.see-all { font-size: 13px; font-weight: 600; color: var(--primary-green); display: flex; align-items: center; gap: 4px; }
.see-all:hover { color: var(--primary-green-hover); }

/* =========================================================
   Category Grid fallback / Quick category grid
   ========================================================= */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-item {
  background: var(--surface); border: 1px solid var(--grey-200); border-radius: var(--radius-md);
  padding: 14px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: all 0.2s ease;
}
.cat-item:hover { border-color: var(--primary-green); transform: translateY(-1px); }
.cat-item .ic {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--primary-green-light); color: var(--primary-green);
}
.cat-item span { font-size: 12px; font-weight: 600; color: var(--ink-700); }

/* =========================================================
   Vendor slider / Promoted vendors
   ========================================================= */
.vendor-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.vendor-row::-webkit-scrollbar { display: none; }
.vendor-card {
  scroll-snap-align: start; flex: 0 0 150px;
  background: var(--surface); border: 1px solid var(--grey-200); border-radius: var(--radius-md);
  padding: 14px 10px; text-align: center;
}
.vendor-avatar {
  width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 8px; object-fit: cover;
  border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--primary-green);
}
.vendor-name { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 4px; }
.verified { color: var(--primary-green); width: 13px; height: 13px; }
.vendor-sub { font-size: 11px; color: var(--grey-600); margin-top: 2px; }

/* =========================================================
   Featured strip (Styled in Green-Dark like Jiji banner)
   ========================================================= */
.featured {
  background: #1e3a24;
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.featured::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 90% 0%, rgba(61,184,58,0.3), transparent 60%);
}
.featured .section-head h2, .featured .section-head .eyebrow { color: #fff; }
.featured .eyebrow { color: var(--primary-green); }
.featured .see-all { color: var(--primary-green-light); }

/* =========================================================
   Footer (Jiji Clean Dark Gray Footer)
   ========================================================= */
.site-footer {
  background: #2A2A2A;
  color: #a1a1aa;
  margin-top: 60px;
  padding: 60px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 860px) {
  .footer-grid { gap: 28px; }
}
.footer-grid h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
}
.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links-list a,
.footer-grid a {
  font-size: 13.5px;
  color: #a1a1aa;
  text-decoration: none;
  transition: color .15s ease;
}
.footer-links-list a:hover,
.footer-grid a:hover { color: #fff; }
.footer-brand .brand-word { color: #fff; }
.footer-logo-link { display: inline-block; line-height: 0; text-decoration: none; }
.footer-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.footer-brand p {
  color: #a1a1aa;
  font-size: 13.5px;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 280px;
}
.footer-store-badges {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-store-badges a { display: inline-block; line-height: 0; }
.footer-store-badges svg { display: block; height: 40px; width: auto; }
.social-row { display: flex; gap: 16px; }
.social-row a {
  color: #a1a1aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s ease;
}
.social-row a:hover { color: var(--primary-green); }
.footer-bottom {
  border-top: 1px solid #3f3f46;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: #a1a1aa;
  font-size: 13.5px;
}

/* =========================================================
   Detail Page layouts (listing.html)
   ========================================================= */
.listing-layout {
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  gap: 24px;
  padding: 20px 0 60px;
  align-items: start;
  min-width: 0;
}
@media (max-width: 900px) {
  .listing-layout { grid-template-columns: minmax(0, 1fr); }
}
.details-main-card {
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

/* Jiji Sidebar Box Components */
.jiji-price-card {
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.jiji-price-card .price-tag {
  font-size: 28px; font-weight: 800; color: var(--primary-green);
}
.jiji-price-card .negotiable {
  font-size: 12.5px; color: var(--grey-600); margin-top: 2px; display: block;
}

.jiji-seller-card {
  background: var(--surface);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.jiji-seller-card .seller-header {
  display: flex; align-items: center; gap: 12px;
}
.jiji-seller-card .seller-avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
}
.jiji-seller-card .seller-details h3 {
  font-size: 15px; font-weight: 700; margin-bottom: 2px;
}
.jiji-seller-card .seller-details .rating {
  color: #f1c40f; font-size: 12px; display: flex; align-items: center; gap: 2px;
}

.jiji-safety-card {
  background: #fff7e6;
  border: 1px solid #ffe8cc;
  border-radius: var(--radius-md);
  padding: 16px;
  color: #b25d00;
  font-size: 13px;
  line-height: 1.5;
}
.jiji-safety-card h4 {
  color: #d46b08; font-size: 14px; margin-bottom: 8px; font-weight: 700; display: flex; align-items: center; gap: 6px;
}

/* =========================================================
   Mobile Drawer & Responsiveness
   ========================================================= */
.mobile-drawer { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.mobile-drawer .drawer-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity .25s ease;
}
.mobile-drawer .drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(280px, 80vw); background: var(--surface);
  padding: 20px; box-shadow: var(--shadow-pop);
  transform: translateX(100%); transition: transform .28s ease;
  overflow-y: auto;
}
.mobile-drawer.open { pointer-events: auto; }
.mobile-drawer.open .drawer-backdrop { opacity: 1; }
.mobile-drawer.open .drawer-panel { transform: translateX(0); }

@media (max-width: 880px) {
  .header-row {
    padding: 10px 12px;
    gap: 10px;
  }
  .header-loc-search {
    display: none !important;
  }
  .omnisearch {
    display: none;
  }
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-700);
    cursor: pointer;
  }
  .brand-logo {
    height: 34px;
    max-width: 140px;
  }
  .btn-sell {
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .header-actions {
    gap: 6px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  .nav-strip {
    gap: 14px;
    padding: 6px 12px;
  }
}

/* =========================================================
   Breadcrumbs
   ========================================================= */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--grey-600); margin: 12px 0 16px; }
.breadcrumb a:hover { color: var(--primary-green); }
.breadcrumb .sep { color: var(--grey-400); }

/* =========================================================
   Utilities
   ========================================================= */
.flex { display: flex; }
.gap-8 { gap: 8px; }
.mt-0 { margin-top: 0; }
.text-grey { color: var(--grey-600); }
.badge-verified {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  background: var(--primary-green-light); color: var(--primary-green-hover); padding: 3px 8px; border-radius: 20px;
}
.badge-verified svg { width: 12px; height: 12px; }

/* =========================================================
   New Jiji Homepage Specific Layouts
   ========================================================= */
.jiji-hero-panel {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-hover) 100%);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.jiji-hero-panel > div:first-child {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}
.jiji-hero-panel h1 {
  color: #fff;
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  margin: 0;
}
.jiji-hero-panel h1 span {
  color: var(--accent-orange);
}
.jiji-hero-panel p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14.5px;
  margin: 0;
  max-width: 500px;
}
.jiji-hero-search {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-sm);
  max-width: 650px;
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  min-width: 0;
}
.jiji-hero-search select,
.jiji-hero-search .product-cat-select {
  border: none;
  background: var(--grey-100);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--ink-700);
  border-right: 1px solid var(--grey-200);
  outline: none;
  max-width: 150px;
  min-width: 0;
  width: auto;
  flex: 0 1 auto;
}
.jiji-hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 14.5px;
  background: transparent;
  color: var(--ink-900);
  min-width: 0;
}
.jiji-hero-search button {
  background: var(--accent-orange);
  color: #fff;
  font-weight: 700;
  padding: 0 24px;
  transition: background 0.15s;
}
.jiji-hero-search button:hover {
  background: var(--accent-orange-hover);
}

.jiji-quick-cats {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 10px;
  box-sizing: border-box;
}
.quick-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 78px;
  color: #fff;
  transition: transform 0.2s;
}
.quick-cat-card:hover {
  transform: translateY(-2px);
}
.quick-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s, color 0.2s;
}
.quick-cat-card:hover .quick-cat-icon {
  background: var(--surface);
  color: var(--primary-green);
}
.quick-cat-card span {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* =========================================================
   Single listing page (design: listing.html)
   ========================================================= */
.listing-sidebar,
.sticky-sidebar {
  position: sticky;
  top: 96px;
}
@media (max-width: 900px) {
  .listing-sidebar,
  .sticky-sidebar { position: static; }
}

.gallery-main {
  aspect-ratio: 16/10;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--grey-200);
  background: var(--grey-100);
  position: relative;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .card-badge { position: absolute; top: 14px; left: 14px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb {
  flex: 0 0 78px; height: 58px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; opacity: .7; padding: 0; background: none;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--primary-green); opacity: 1; }

.listing-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 20px; }
.listing-title-row h1 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.listing-sub { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--grey-600); }
.listing-sub span { display: flex; align-items: center; gap: 5px; }
.listing-sub svg { width: 14px; height: 14px; color: var(--grey-400); }

.tabs { margin-top: 24px; }
.tab-list { display: flex; gap: 4px; border-bottom: 1.5px solid var(--grey-200); }
.tab-btn {
  padding: 10px 4px; margin-right: 22px; font-size: 14px; font-weight: 600; color: var(--grey-600);
  border: none; background: none; border-bottom: 2.5px solid transparent; position: relative; top: 1.5px;
  cursor: pointer;
}
.tab-btn.active { color: var(--primary-green); border-color: var(--primary-green); }
.tab-panel { display: none; padding: 20px 0; }
.tab-panel.active { display: block; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
@media (max-width: 520px) { .spec-grid { grid-template-columns: 1fr; } }
.spec-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed var(--grey-200); }
.spec-row span:first-child { color: var(--grey-600); }
.spec-row span:last-child { font-weight: 600; color: var(--ink-900); }
.desc-text { font-size: 14.5px; line-height: 1.7; color: var(--ink-700); }
.desc-text p { margin-bottom: 12px; }

.map-embed {
  margin-top: 22px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--grey-200);
  aspect-ratio: 16/6;
  background:
    linear-gradient(#f7fafc, #edf2f7),
    repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(0, 0, 0, .03) 23px),
    repeating-linear-gradient(90deg, transparent, transparent 22px, rgba(0, 0, 0, .03) 23px);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.map-pin {
  width: 32px; height: 32px; border-radius: 50% 50% 50% 0; background: var(--primary-green); transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-pop);
}
.map-pin svg { transform: rotate(45deg); color: #fff; width: 14px; height: 14px; }
.map-label {
  position: absolute; bottom: 12px; left: 12px; background: var(--surface); padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; box-shadow: var(--shadow-card); border: 1px solid var(--grey-200);
}

.reveal-phone {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--primary-green); border-radius: var(--radius-sm); padding: 12px;
  font-weight: 600; font-size: 14px;
  background: transparent; color: var(--primary-green); width: 100%; cursor: pointer; transition: all .2s;
}
.reveal-phone:hover { background: var(--primary-green-light); }
.reveal-phone .full { display: none; font-family: var(--font-body); }
.reveal-phone.revealed { background: var(--primary-green); color: #fff; border-color: var(--primary-green); }
.reveal-phone.revealed .masked { display: none; }
.reveal-phone.revealed .full { display: inline; }

.related h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }

.mobile-sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface);
  padding: 12px 16px; border-top: 1px solid var(--grey-200);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .05); z-index: 999; display: none;
}
.mobile-sticky-bar > div { display: flex; gap: 12px; }
.mobile-sticky-bar .btn { flex: 1; border-radius: var(--radius-md); padding: 14px; text-align: center; }
@media (max-width: 900px) {
  .mobile-sticky-bar { display: block; }
  body.single-product { padding-bottom: 80px; }
}

/* RTL mirroring for listing internals. */
[dir="rtl"] .gallery-main .card-badge { left: auto; right: 14px; }
[dir="rtl"] .map-label { left: auto; right: 12px; }
[dir="rtl"] .tab-btn { margin-right: 0; margin-left: 22px; }

/* =========================================================
   Mobile / tablet polish
   ========================================================= */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, svg { max-width: 100%; height: auto; }
.header-loc-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 650px;
  margin-inline-end: 12px;
}

.drawer-search {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.drawer-search input {
  flex: 1;
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.drawer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-links a,
.drawer-links > a,
.drawer-links .menu-item > a {
  display: block;
  padding: 11px 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  border-radius: 8px;
}
.drawer-links a:hover,
.drawer-links .menu-item > a:hover {
  background: var(--primary-green-light);
  color: var(--primary-green-hover);
}
.drawer-panel hr {
  border: none;
  border-top: 1px solid var(--grey-200);
  margin: 14px 0;
}

[dir="rtl"] .mobile-drawer .drawer-panel {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}
[dir="rtl"] .mobile-drawer.open .drawer-panel {
  transform: translateX(0);
}

@media (max-width: 960px) {
  .jiji-hero-panel {
    padding: 28px 16px;
    border-radius: var(--radius-sm);
  }
  .jiji-hero-search {
    flex-direction: column;
  }
  .jiji-hero-search select,
  .jiji-hero-search .product-cat-select {
    max-width: none;
    width: 100%;
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--grey-200);
  }
  .jiji-hero-search button {
    padding: 14px;
    width: 100%;
  }
  .jiji-quick-cats {
    gap: 12px 10px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .jiji-quick-cats::-webkit-scrollbar { display: none; }
  .quick-cat-card { flex: 0 0 72px; width: 72px; }
}

@media (max-width: 680px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .section { margin-top: 28px; padding: 28px 0; }
  .section-head h2 { font-size: 18px; }
  .card-title { font-size: 13px; }
  .card-price { font-size: 15px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
  .footer-brand p { max-width: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-logo { height: 36px; }

  .btn-sell span,
  .btn-sell .sell-label { display: none; }

  .vendor-header { padding: 20px 0; margin-bottom: 20px; }
  .vendor-banner { height: 140px; margin-bottom: -48px; }
  .vendor-info-box { padding: 0 12px; gap: 14px; }
  .vendor-avatar,
  .vendor-avatar-img { width: 88px; height: 88px; }
  .vendor-name { font-size: 20px; justify-content: center; }
  .vendor-content { gap: 20px; }

  .dashboard-layout { grid-template-columns: 1fr; gap: 20px; padding: 20px 0 40px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card p { font-size: 20px; }

  .listing-title-row { flex-direction: column; gap: 10px; }
  .listing-title-row h1 { font-size: 18px; }
  .gallery-thumb { flex: 0 0 64px; height: 48px; }
  .details-main-card { padding: 16px; }

  .search-shell { gap: 16px; }
  .woocommerce table.shop_table,
  .woocommerce-cart-form,
  .woocommerce-checkout { overflow-x: auto; }
}

@media (max-width: 420px) {
  .grid-4,
  .grid-3 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-logo { height: 30px; max-width: 120px; }
  .btn-sell {
    padding: 8px 10px;
  }
  .btn-sell svg { margin: 0; }
  .header-actions .icon-btn:nth-of-type(1) { display: none; } /* hide messages icon on tiny screens — still in drawer */
  .jiji-hero-panel h1 { font-size: 20px; }
  .quick-cat-card { flex: 0 0 64px; width: 64px; }
  .quick-cat-icon { width: 42px; height: 42px; }
}

.header-loc-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--grey-200);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-loc-search .omnisearch { flex: 1; margin: 0; }
.btn-sell { display: inline-flex; align-items: center; gap: 6px; }

.filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.filter-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Mobile menu + hero fixes ---- */
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.drawer-close {
  border: none;
  background: var(--grey-100);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-700);
  cursor: pointer;
}
.drawer-search {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.drawer-search input {
  flex: 1;
  border: none;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}
.drawer-search button {
  border: none;
  background: var(--primary-green);
  color: #fff;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.drawer-lang {
  margin: 12px 0 4px;
}
.drawer-lang .nigerbizz-lang-switcher {
  justify-content: flex-start;
}

@media (max-width: 880px) {
  .hide-on-mobile { display: none !important; }
  .header-actions { gap: 8px; margin-left: auto; flex-shrink: 0; }
  .header-row { min-width: 0; }
  .brand { min-width: 0; overflow: hidden; }
  .nav-strip { display: none; } /* categories live in the drawer on phones */

  .btn-sell span,
  .btn-sell .sell-label { display: none; }
  .btn-sell { padding: 8px 10px; }

  .jiji-hero-panel {
    padding: 18px 12px 14px;
    gap: 12px;
    margin-bottom: 14px;
  }
  .jiji-hero-panel h1 { font-size: 22px; line-height: 1.25; }
  .jiji-hero-panel p {
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .jiji-quick-cats {
    margin-top: 2px;
    padding-bottom: 2px;
  }
  .hero-slider-section {
    height: 150px;
    margin-top: 4px;
    max-width: 100%;
  }
  .hero-slider-section .hero-slide img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
  }
  .hero-nav { display: none; }
  .hero-content-overlay { padding: 14px 16px; }
  .hero-slider-section .hero-content-overlay h2 { font-size: 16px; }
}

/* Mid-phone / small tablet (~545px) — prevent layout blowout */
@media (max-width: 600px) {
  .container { padding-left: 10px; padding-right: 10px; }
  .grid-4,
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-item { padding: 12px 6px; }
  .cat-item span { font-size: 11px; }

  .jiji-hero-panel {
    padding: 16px 10px 12px;
    gap: 10px;
    border-radius: 8px;
  }
  .jiji-hero-panel h1 { font-size: 20px; }
  .jiji-hero-panel p { font-size: 12.5px; -webkit-line-clamp: 2; }
  .jiji-hero-search select,
  .jiji-hero-search .product-cat-select,
  .jiji-hero-search input,
  .jiji-hero-search button {
    font-size: 14px;
  }
  .jiji-hero-search input { padding: 12px; }
  .quick-cat-card { flex: 0 0 64px; width: 64px; }
  .quick-cat-icon { width: 40px; height: 40px; }
  .quick-cat-card span { font-size: 10px; }

  .hero-slider-section { height: 130px; }
  .hero-slider-section .hero-content-overlay h2 { font-size: 15px; }
  .hero-slider-section .hero-content-overlay p { font-size: 12px; }

  .brand-logo { height: 30px; max-width: 110px; }
  .site-header .brand .brand-logo {
    height: 30px !important;
    max-width: 110px !important;
  }
  .header-row { gap: 8px; padding: 8px 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-store-badges { align-items: flex-start; }
}

/* Hard stop against horizontal page scroll on narrow devices */
@media (max-width: 960px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .container,
  .site-header,
  .header-row,
  main,
  .site-footer {
    max-width: 100%;
    min-width: 0;
  }
  img, video, iframe {
    max-width: 100%;
  }
  .hero-slider-section .hero-slide img {
    height: 100%;
  }
}
