/* ==========================================================================
   TradeNexus B2B Wholesale Marketplace - Custom Master Stylesheet
   Combines modern B2B SaaS aesthetics, Tailwind utilities, & Bootstrap 5
   ========================================================================== */

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

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Theme Colors */
  --primary: #0284c7;        /* Sky/Ocean Blue - Trustworthy B2B */
  --primary-hover: #0369a1;
  --primary-dark: #0f172a;
  --primary-light: #e0f2fe;
  
  --secondary: #0d9488;      /* Teal / Growth */
  --secondary-light: #ccfbf1;
  
  --gold: #d97706;
  --gold-bg: #fef3c7;
  --platinum: #7c3aed;
  --platinum-bg: #ede9fe;
  --free-badge: #64748b;
  --free-bg: #f1f5f9;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Neutrals */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --shadow-hover: 0 14px 28px rgba(15, 23, 42, 0.09), 0 10px 10px rgba(15, 23, 42, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

body {
  font-family: var(--font-body);
  color: var(--slate-700);
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

/* Demo Switcher Bar */
.demo-top-bar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1040;
}
.demo-top-bar a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}
.demo-top-bar a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Custom Navbar */
.navbar-marketplace {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  transition: all 0.3s ease;
}
.navbar-marketplace .nav-link {
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--slate-700);
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.navbar-marketplace .nav-link:hover,
.navbar-marketplace .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

.brand-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Hero Section */
.hero-gradient-bg {
  background: radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.06) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(13, 148, 136, 0.06) 0%, transparent 40%),
              #ffffff;
  border-bottom: 1px solid var(--slate-200);
}

.hero-search-box {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.1);
  border-radius: var(--radius-lg);
  padding: 8px;
}

/* Badges */
.badge-verified {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-gold {
  background-color: var(--gold-bg);
  color: var(--gold);
  border: 1px solid #fde68a;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-platinum {
  background-color: var(--platinum-bg);
  color: var(--platinum);
  border: 1px solid #ddd6fe;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-free {
  background-color: var(--free-bg);
  color: var(--free-badge);
  border: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 9999px;
}

.badge-moq {
  background-color: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  border: 1px solid #e2e8f0;
}

/* B2B Marketplace Product Cards */
.b2b-product-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.b2b-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}
.b2b-product-card .img-wrapper {
  position: relative;
  overflow: hidden;
  height: 210px;
  background-color: #f8fafc;
}
.b2b-product-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.b2b-product-card:hover .img-wrapper img {
  transform: scale(1.05);
}
.b2b-product-card .moq-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.b2b-product-card .card-body-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.wholesale-price {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}
.wholesale-price-unit {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

/* Category Cards */
.b2b-category-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}
.b2b-category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--primary);
}
.b2b-category-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
  background-color: var(--primary-light);
  color: var(--primary);
  transition: all 0.2s ease;
}
.b2b-category-card:hover .b2b-category-icon-box {
  background-color: var(--primary);
  color: #ffffff;
}

/* Supplier Card */
.b2b-supplier-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.b2b-supplier-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
  transform: translateY(-3px);
}
.supplier-avatar {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--slate-200);
  padding: 2px;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background-color: #f8fafc;
}
.dashboard-sidebar {
  width: 260px;
  background-color: #ffffff;
  border-right: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s;
}
.dashboard-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--slate-600);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 3px;
}
.sidebar-link:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
}
.sidebar-link.active {
  background-color: #e0f2fe;
  color: var(--primary);
  font-weight: 600;
}
.sidebar-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

/* Admin Sidebar specific dark theme */
.admin-sidebar {
  background-color: #0f172a;
  border-right: 1px solid #1e293b;
}
.admin-sidebar .sidebar-link {
  color: #94a3b8;
}
.admin-sidebar .sidebar-link:hover {
  background-color: #1e293b;
  color: #ffffff;
}
.admin-sidebar .sidebar-link.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* Metric Cards */
.metric-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.metric-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.metric-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Chat Layout */
.chat-container {
  height: calc(100vh - 120px);
  min-height: 600px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.chat-thread-item {
  cursor: pointer;
  border-bottom: 1px solid var(--slate-100);
  padding: 14px 16px;
  transition: background 0.15s ease;
}
.chat-thread-item:hover {
  background-color: #f8fafc;
}
.chat-thread-item.active {
  background-color: #f0fdfa;
  border-left: 3px solid var(--secondary);
}
.chat-bubble-received {
  background-color: #f1f5f9;
  color: var(--slate-800);
  border-radius: 16px 16px 16px 4px;
  padding: 12px 16px;
  max-width: 75%;
}
.chat-bubble-sent {
  background-color: var(--primary);
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  max-width: 75%;
}

/* Stepper for Registration */
.stepper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
}
.stepper-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--slate-200);
  z-index: 1;
  transform: translateY(-50%);
}
.step-item {
  position: relative;
  z-index: 2;
  background-color: #ffffff;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--slate-100);
  border: 2px solid var(--slate-300);
  color: var(--slate-500);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.step-item.active .step-circle {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-light);
}
.step-item.completed .step-circle {
  background-color: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

/* Image Upload Area */
.drag-drop-zone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  background: var(--slate-50);
  cursor: pointer;
  transition: all 0.2s ease;
}
.drag-drop-zone:hover, .drag-drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.image-preview-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 100px;
  border: 1px solid var(--slate-200);
}
.image-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
}

/* Table styling */
.table-b2b {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-b2b th {
  background-color: var(--slate-50);
  color: var(--slate-600);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-200);
}
.table-b2b td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--slate-100);
  font-size: 0.88rem;
}
.table-b2b tr:hover td {
  background-color: #fafbfc;
}

/* Utilities */
.btn-primary-b2b {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-primary-b2b:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-outline-b2b {
  background-color: transparent;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-outline-b2b:hover {
  background-color: var(--slate-100);
  border-color: var(--slate-400);
  color: var(--slate-900);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Floating Navigation Demo Helper */
.demo-floating-nav {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-xl);
  border-radius: 9999px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.8rem;
}
.demo-floating-nav a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}
.demo-floating-nav a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Landing Page Modern Enhancements
   ========================================================================== */

/* Trending Search Tags */
.trending-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.trending-tag:hover {
  background: var(--primary-light);
  border-color: #7dd3fc;
  color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Live Market Pulse Marquee */
.market-pulse-bar {
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.75rem;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Interactive Hero RFQ / Calculator Card */
.hero-interactive-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  position: relative;
  overflow: hidden;
}
.hero-interactive-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #0d9488, #f59e0b);
}

/* Trust Pillar Cards */
.trust-pillar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  transition: all 0.25s ease;
  height: 100%;
}
.trust-pillar-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px -8px rgba(2, 132, 199, 0.15);
}
.trust-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
}

/* RFQ Interactive Section */
.rfq-spotlight-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #092e40 100%);
  color: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
}
.rfq-spotlight-section::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Testimonial Cards */
.b2b-testimonial-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}
.b2b-testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

/* Membership Card Fixes and Polish */
.membership-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.membership-card-inner:hover {
  transform: translateY(-4px);
}
.membership-gold {
  border: 2px solid #f59e0b;
  box-shadow: 0 15px 30px -10px rgba(245, 158, 11, 0.2);
}
.membership-platinum {
  border: 2px solid #8b5cf6;
  box-shadow: 0 15px 30px -10px rgba(139, 92, 246, 0.2);
}
.membership-free {
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
}

/* Savings Ribbon */
.savings-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

