/* ============================================================
   LiftExpo B2B Marketplace - Main Stylesheet
   ============================================================ */

/* CSS Variables */
:root {
  --primary: #0056b3;
  --primary-dark: #003d82;
  --primary-light: #e8f0fe;
  --secondary: #ff6b00;
  --secondary-dark: #cc5500;
  --gold: #FFB800;
  --gold-dark: #e6a400;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --dark: #1a1a2e;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --white: #ffffff;
  --text: #333333;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.25s ease;
  --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--gray-100);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-fluid { width: 100%; padding: 0 20px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
[class*="col-"] { padding: 0 12px; }
.col-1 { width: 8.333%; } .col-2 { width: 16.666%; } .col-3 { width: 25%; }
.col-4 { width: 33.333%; } .col-5 { width: 41.666%; } .col-6 { width: 50%; }
.col-7 { width: 58.333%; } .col-8 { width: 66.666%; } .col-9 { width: 75%; }
.col-10 { width: 83.333%; } .col-11 { width: 91.666%; } .col-12 { width: 100%; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.text-center { text-align: center; } .text-right { text-align: right; } .text-left { text-align: left; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-30 { margin-top: 30px; } .mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; } .mb-30 { margin-bottom: 30px; } .mb-40 { margin-bottom: 40px; }
.py-20 { padding: 20px 0; } .py-30 { padding: 30px 0; } .py-40 { padding: 40px 0; }
.py-60 { padding: 60px 0; } .py-80 { padding: 80px 0; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  background: var(--dark);
  color: var(--gray-300);
  font-size: 12px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: var(--gray-300); }
.topbar a:hover { color: var(--white); }
.topbar-left { display: flex; gap: 20px; align-items: center; }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.lang-selector { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.lang-selector select {
  background: transparent;
  border: none;
  color: var(--gray-300);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.lang-selector select option { background: var(--dark); color: white; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img { height: 40px; width: auto; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.5px;
}
.logo-tagline { font-size: 10px; color: var(--gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* Search Bar */
.header-search { flex: 1; max-width: 600px; }
.search-form { display: flex; border: 2px solid var(--primary); border-radius: 6px; overflow: hidden; }
.search-category {
  border: none;
  border-right: 1px solid var(--gray-300);
  background: var(--gray-100);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gray-700);
  min-width: 140px;
  outline: none;
}
.search-input {
  flex: 1;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  color: var(--text);
}
.search-btn {
  background: var(--primary);
  border: none;
  color: white;
  padding: 10px 20px;
  font-size: 15px;
  transition: var(--transition);
}
.search-btn:hover { background: var(--primary-dark); }

/* Header Actions */
.header-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.btn-post-request {
  background: var(--secondary);
  color: white !important;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}
.btn-post-request:hover { background: var(--secondary-dark); }
.btn-login { color: var(--primary); font-size: 13px; font-weight: 500; }
.btn-register {
  background: var(--primary);
  color: white !important;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.btn-register:hover { background: var(--primary-dark); }

/* User Menu */
.user-menu { position: relative; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 13px;
}
.user-menu-trigger .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 12px;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  display: none;
  z-index: 100;
  overflow: hidden;
}
.user-menu:hover .user-dropdown,
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
}
.user-dropdown a:hover { background: var(--gray-100); color: var(--primary); }
.user-dropdown .divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ============================================================
   MAIN NAVIGATION
   ============================================================ */
.main-nav {
  background: var(--primary);
  position: relative;
}
.nav-list {
  display: flex;
  align-items: center;
}
.nav-item {
  position: relative;
}
.nav-item > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 18px;
  color: rgba(255,255,255,0.9);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-item > a:hover,
.nav-item.active > a { color: white; background: rgba(255,255,255,0.12); }
.nav-item > a .fa-chevron-down { font-size: 10px; transition: var(--transition); }
.nav-item:hover > a .fa-chevron-down { transform: rotate(180deg); }

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  border-top: 3px solid var(--primary);
  z-index: 200;
  min-width: 700px;
  display: none;
  border-radius: 0 0 8px 8px;
}
.nav-item:hover .mega-menu { display: block; }
.mega-menu-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 24px; }
.mega-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.mega-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--text);
  font-size: 13px;
}
.mega-col a:hover { color: var(--primary); padding-left: 4px; }
.mega-col a i { color: var(--gray-500); width: 14px; font-size: 12px; }

/* Simple Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-top: 3px solid var(--primary);
  z-index: 200;
  min-width: 220px;
  display: none;
  border-radius: 0 0 8px 8px;
  padding: 8px 0;
}
.nav-item:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 9px 20px;
  color: var(--text);
  font-size: 13.5px;
}
.dropdown-menu a:hover { background: var(--gray-100); color: var(--primary); }

/* Mobile Nav Toggle */
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 22px; padding: 8px; }
.nav-close { display: none; position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero h1 span { color: var(--gold); }
.hero p { font-size: 18px; color: rgba(255,255,255,0.8); margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-search { max-width: 680px; margin: 0 auto 40px; }
.hero-search .search-form {
  border: none;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  overflow: hidden;
}
.hero-search .search-input { padding: 16px 20px; font-size: 15px; }
.hero-search .search-btn { padding: 16px 28px; font-size: 16px; }
.hero-stats { display: flex; justify-content: center; gap: 50px; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 32px; font-weight: 800; color: white; display: block; }
.hero-stat .label { font-size: 13px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-header { margin-bottom: 32px; }
.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.section-subtitle { font-size: 15px; color: var(--text-muted); margin-top: 10px; }
.view-all {
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.view-all:hover { gap: 8px; }

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.categories-section { padding: 50px 0; background: white; }
.category-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 5px 20px rgba(0,86,179,0.1);
  transform: translateY(-3px);
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: var(--transition);
}
.category-card:hover::before { transform: scaleX(1); }
.cat-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
  color: var(--primary);
  transition: var(--transition);
}
.category-card:hover .cat-icon { background: var(--primary); color: white; }
.cat-name { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.cat-count { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transform: translateY(-3px);
  border-color: transparent;
}
.product-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-200);
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.product-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.product-company { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.product-name { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-name a { color: inherit; }
.product-name a:hover { color: var(--primary); }
.product-price { font-size: 15px; font-weight: 700; color: var(--primary); margin-top: auto; padding-top: 8px; }
.product-price small { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.product-card-footer { padding: 10px 16px; border-top: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.product-footer-country { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.btn-inquire { font-size: 12px; color: var(--primary); font-weight: 600; padding: 5px 12px; border: 1px solid var(--primary); border-radius: 4px; transition: var(--transition); }
.btn-inquire:hover { background: var(--primary); color: white; }

/* ============================================================
   COMPANY CARDS
   ============================================================ */
.company-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: var(--transition);
}
.company-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.company-card.gold-card { border-color: var(--gold); }
.company-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: contain;
  border: 1px solid var(--border);
  padding: 4px;
  flex-shrink: 0;
  background: white;
}
.company-info { flex: 1; min-width: 0; }
.company-name { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.company-name a { color: inherit; }
.company-name a:hover { color: var(--primary); }
.company-location { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.company-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.company-cat-tag { background: var(--primary-light); color: var(--primary); font-size: 11px; padding: 3px 8px; border-radius: 20px; }
.company-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }

/* ============================================================
   BADGES
   ============================================================ */
.badge-gold {
  background: linear-gradient(135deg, #FFB800, #ff8c00);
  color: white;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}
.badge-verified {
  background: var(--success);
  color: white;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #d4edda; color: var(--success); }
.badge-danger { background: #f8d7da; color: var(--danger); }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-secondary { background: var(--gray-200); color: var(--gray-700); }

/* ============================================================
   BUYING REQUESTS
   ============================================================ */
.request-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.request-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.request-title { font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.request-title a { color: inherit; }
.request-title a:hover { color: var(--primary); }
.request-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.request-meta span { display: flex; align-items: center; gap: 4px; }
.request-desc { font-size: 13px; color: var(--gray-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.request-footer { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,86,179,0.1); }
.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { color: var(--danger); font-size: 12px; margin-top: 4px; display: block; }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; padding-right: 36px; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-check input[type="checkbox"],
.form-check input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: 6px 0 0 6px; }
.input-addon {
  padding: 10px 14px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  color: var(--gray-600);
  white-space: nowrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.btn-secondary { background: var(--secondary); color: white; border-color: var(--secondary); }
.btn-secondary:hover { background: var(--secondary-dark); border-color: var(--secondary-dark); color: white; }
.btn-gold { background: var(--gold); color: white; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: white; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,0.7); }
.btn-outline-white:hover { background: white; color: var(--primary); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-light { background: var(--gray-100); color: var(--gray-700); border-color: var(--border); }
.btn-light:hover { background: var(--gray-200); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
}
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--gray-100); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  position: relative;
}
.alert i { margin-top: 1px; flex-shrink: 0; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.close-alert {
  position: absolute;
  right: 12px;
  top: 12px;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
  padding: 2px 5px;
}
.close-alert:hover { opacity: 1; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { border-bottom: 2px solid var(--border); display: flex; gap: 0; margin-bottom: 24px; }
.tab-btn {
  padding: 12px 20px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--text-muted); padding: 14px 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--gray-400); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.sidebar-widget-title {
  padding: 14px 18px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget-body { padding: 16px 18px; }
.filter-group { margin-bottom: 20px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 10px; }
.filter-list { display: flex; flex-direction: column; gap: 8px; }
.filter-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.filter-item input { accent-color: var(--primary); }
.filter-count { margin-left: auto; font-size: 11px; background: var(--gray-200); color: var(--gray-600); padding: 2px 7px; border-radius: 20px; }

/* ============================================================
   ADVERTISEMENT BLOCKS
   ============================================================ */
.advertisement { border-radius: var(--radius); overflow: hidden; }
.advertisement img { width: 100%; display: block; }
.ad-label { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 4px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-nav { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; }
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination li a,
.pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.pagination li.active a { background: var(--primary); border-color: var(--primary); color: white; }
.pagination li.dots { pointer-events: none; }
.pagination-info { font-size: 13px; color: var(--text-muted); }

/* ============================================================
   STARS / RATING
   ============================================================ */
.stars { color: var(--gold); font-size: 13px; }
.stars .far { color: var(--gray-300); }
.rating-value { font-weight: 600; font-size: 13px; color: var(--gray-700); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title { font-size: 18px; font-weight: 700; color: var(--dark); }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-500); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* ============================================================
   GOLD UPGRADE BANNER
   ============================================================ */
.gold-banner {
  background: linear-gradient(135deg, #1a1a2e, #2d4a6a);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gold-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,184,0,0.05);
  border-radius: 50%;
}
.gold-banner h2 { font-size: 28px; font-weight: 800; color: white; margin-bottom: 12px; }
.gold-banner h2 span { color: var(--gold); }
.gold-banner p { color: rgba(255,255,255,0.7); margin-bottom: 24px; }
.gold-features { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.gold-feature { display: flex; align-items: center; gap: 8px; color: white; font-size: 14px; }
.gold-feature i { color: var(--gold); }

/* ============================================================
   PRICING CARDS
   ============================================================ */
.pricing-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}
.pricing-card.featured { border-color: var(--gold); transform: scale(1.04); box-shadow: 0 10px 40px rgba(255,184,0,0.2); }
.pricing-popular {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pricing-name { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.pricing-price { font-size: 42px; font-weight: 800; color: var(--primary); margin: 16px 0; }
.pricing-price sup { font-size: 20px; font-weight: 700; }
.pricing-price span { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.pricing-features { text-align: left; margin-bottom: 24px; }
.pricing-feature { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
.pricing-feature:last-child { border-bottom: none; }
.pricing-feature i { color: var(--success); font-size: 14px; flex-shrink: 0; }

/* ============================================================
   STATISTICS SECTION
   ============================================================ */
.stats-section { background: var(--primary); padding: 50px 0; }
.stat-item { text-align: center; }
.stat-num { font-size: 40px; font-weight: 800; color: white; display: block; }
.stat-label { font-size: 13px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 60px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo-name { color: white; font-size: 26px; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin: 14px 0 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 15px;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: white; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { display: block; font-size: 14px; color: var(--gray-500); margin-bottom: 10px; transition: var(--transition); }
.footer-col a:hover { color: white; padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: var(--gray-500); }
.footer-bottom-links a:hover { color: white; }

/* ============================================================
   PAGE BANNER
   ============================================================ */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 36px 0;
  color: white;
}
.page-banner h1 { font-size: 30px; font-weight: 700; margin-bottom: 6px; }
.page-banner p { color: rgba(255,255,255,0.8); font-size: 15px; }

/* ============================================================
   COMPANY PROFILE PAGE
   ============================================================ */
.company-profile-header {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.company-banner { height: 200px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); overflow: hidden; }
.company-banner img { width: 100%; height: 100%; object-fit: cover; }
.company-profile-info { padding: 20px 24px; display: flex; align-items: flex-start; gap: 20px; }
.company-profile-logo {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  margin-top: -50px;
  object-fit: contain;
  background: white;
  flex-shrink: 0;
  padding: 6px;
}
.company-profile-name { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.company-profile-badges { display: flex; gap: 8px; margin-bottom: 10px; }
.company-profile-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-muted); }
.company-profile-meta span { display: flex; align-items: center; gap: 5px; }
.company-profile-actions { margin-left: auto; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.product-gallery { position: sticky; top: 80px; }
.product-main-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--gray-100);
}
.product-main-img img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.product-thumb {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.product-thumb:hover, .product-thumb.active { border-color: var(--primary); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-title { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.product-detail-company { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.product-detail-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: 8px;
}
.product-specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.product-specs tr:nth-child(even) { background: var(--gray-100); }
.product-specs td { padding: 10px 14px; border: 1px solid var(--border); }
.product-specs td:first-child { font-weight: 600; color: var(--gray-700); width: 40%; }

/* ============================================================
   LOADING & SKELETON
   ============================================================ */
.skeleton { background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .grid-6 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
}
@media (max-width: 992px) {
  .hero h1 { font-size: 34px; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing-card.featured { transform: none; }
  .col-3.sidebar { width: 100%; order: -1; }
  .col-9.main-content { width: 100%; }
  /* Product detail: stack gallery + info on tablet */
  .col-5.product-gallery { width: 100%; position: static; }
  .col-5.product-gallery + .col-7 { width: 100%; }
}
@media (max-width: 768px) {
  .topbar { display: none; }
  .header-search { display: none; }
  .header-actions .btn-login, .header-actions .btn-register { display: none; }
  .nav-toggle { display: block; }
  .main-nav .nav-list {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    z-index: 3000;
    box-shadow: 5px 0 30px rgba(0,0,0,0.15);
    transition: left 0.3s ease;
    padding: 60px 0 20px;
  }
  .main-nav .nav-list.open { left: 0; }
  .nav-close { display: block; }
  .nav-item > a { color: var(--text); padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .mega-menu, .dropdown-menu { position: static; display: none !important; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 2900; display: none; }
  .nav-overlay.open { display: block; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 26px; }
  .hero-stats { gap: 24px; }
  .hero-stat .num { font-size: 24px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .gold-banner { padding: 24px; }
  .gold-banner h2 { font-size: 22px; }

  /* ---- COLUMN STACKING ---- */
  /* All .row-based columns stack to full width on mobile */
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { width: 100%; }

  /* ---- COMPANY PROFILE HEADER ---- */
  .company-banner { height: 140px; }
  .company-profile-info {
    flex-direction: column;
    padding: 14px 16px;
    gap: 12px;
  }
  .company-profile-logo {
    width: 80px;
    height: 80px;
    margin-top: -40px;
  }
  .company-profile-name { font-size: 18px; }
  .company-profile-actions {
    margin-left: 0;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }
  .company-profile-actions .btn { flex: 1; min-width: 120px; text-align: center; justify-content: center; }
  .company-profile-meta { gap: 10px; font-size: 12px; }

  /* ---- PRODUCT DETAIL ---- */
  .product-gallery { position: static; top: auto; }
  .product-detail-title { font-size: 18px; }
  .product-specs-table th,
  .product-specs-table td { padding: 8px 10px; font-size: 13px; }

  /* ---- COMPANY PANEL (sidebar + content) ---- */
  /* col-3 sidebar in company/* pages: show above content */
  .col-3:not(.sidebar) + .col-9 { margin-top: 16px; }

  /* ---- FILTER SIDEBAR (suppliers, products pages) ---- */
  .col-3:not(.sidebar) { margin-bottom: 16px; }
}
@media (max-width: 576px) {
  .container { padding: 0 14px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 15px; }
  .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .company-card { flex-direction: column; }
  .section-title { font-size: 20px; }
  .stat-num { font-size: 30px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; justify-content: center; }

  /* ---- PRODUCT DETAIL small screens ---- */
  .product-thumbs { flex-wrap: wrap; }
  .product-thumb { width: 60px; height: 60px; }
  .product-actions { flex-direction: column; }
  .product-actions .btn { width: 100%; justify-content: center; }

  /* ---- COMPANY PANEL sidebar hide on very small screens ---- */
  /* Sidebar nav stays visible but compact */
  .company-panel-nav a { padding: 8px 12px; font-size: 13px; }

  /* ---- BREADCRUMB ---- */
  .breadcrumb { font-size: 12px; gap: 4px; }
  .breadcrumb span { display: none; } /* hide separators on small screens if too long */
}

/* ============================================================
   UTILITY
   ============================================================ */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-gold { color: var(--gold) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-white { color: white !important; }
.fw-bold { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-14 { font-size: 14px !important; }
.separator { height: 1px; background: var(--border); margin: 20px 0; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 13px; margin: 20px 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 999;
  transition: var(--transition);
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============================================================
   IMAGE PLACEHOLDER
   ============================================================ */
.img-placeholder {
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 32px;
}

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results i { font-size: 48px; margin-bottom: 16px; display: block; color: var(--gray-300); }
.no-results h3 { font-size: 20px; color: var(--gray-700); margin-bottom: 8px; }

/* ============================================================
   PRODUCT DESCRIPTION - Rich Text / Table Styles
   ============================================================ */
.product-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-700);
  overflow-x: auto;
}
.product-desc p { margin: 0 0 12px; }
.product-desc h1, .product-desc h2, .product-desc h3,
.product-desc h4, .product-desc h5, .product-desc h6 {
  margin: 16px 0 8px;
  font-weight: 700;
  color: var(--gray-900, #111);
}
.product-desc ul, .product-desc ol {
  padding-left: 24px;
  margin: 0 0 12px;
}
.product-desc li { margin-bottom: 4px; }
.product-desc strong { font-weight: 700; }
.product-desc em { font-style: italic; }
.product-desc a { color: var(--primary); text-decoration: underline; }
.product-desc hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.product-desc img { max-width: 100%; height: auto; border-radius: 6px; }

/* Tables inside product description */
.product-desc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.product-desc table th,
.product-desc table td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid #e2e8f0;
  vertical-align: top;
}
.product-desc table thead th {
  background: var(--primary, #1a56db);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  border-color: var(--primary, #1a56db);
}
.product-desc table tbody tr:nth-child(even) { background: #f8fafc; }
.product-desc table tbody tr:hover { background: #eef2ff; }
.product-desc table td:first-child { font-weight: 600; color: var(--gray-800, #1a202c); }