/* B2B Trade Platform - Custom Styles */

:root {
  --primary: #1a5fb4;
  --primary-dark: #0d4a8f;
  --primary-light: #3584e4;
  --secondary: #2ec27e;
  --secondary-dark: #26a269;
  --accent: #ff7800;
  --accent-dark: #e05d00;
  --dark: #1c1c1c;
  --gray-900: #2d2d2d;
  --gray-800: #3d3d3d;
  --gray-700: #5c5c5c;
  --gray-600: #777777;
  --gray-500: #999999;
  --gray-400: #b8b8b8;
  --gray-300: #d1d1d1;
  --gray-200: #e6e6e6;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --danger: #c01c28;
  --warning: #e5a50a;
  --success: #26a269;
  --info: #1c71d8;
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-900);
  background-color: var(--gray-100);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--dark);
}

/* Navbar */
.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.brand-icon {
  width: 21px;
  height: 21px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.top-header {
  background: var(--gray-900);
  color: var(--gray-300);
  font-size: 0.85rem;
  padding: 8px 0;
}

.top-header a {
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.2s;
}

.top-header a:hover {
  color: var(--white);
}

.main-navbar {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 12px 0;
}

.main-navbar .nav-link {
  font-weight: 500;
  color: var(--gray-800);
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
  color: var(--primary);
  background: rgba(26, 95, 180, 0.08);
}

/* Search Box */
.search-box {
  position: relative;
  max-width: 500px;
  flex: 1;
}

.search-box input {
  border-radius: 25px;
  padding: 12px 24px;
  padding-right: 50px;
  border: 2px solid var(--gray-200);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 95, 180, 0.1);
}

.search-box .btn-search {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: none;
  color: var(--white);
}

.search-box .btn-search:hover {
  background: var(--primary-dark);
}

/* Category Navigation */
.category-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0;
}

.category-nav .nav-link {
  padding: 16px 20px;
  color: var(--gray-700);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.category-nav .nav-link:hover,
.category-nav .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.category-nav .nav-link i {
  margin-right: 8px;
}

/* Mega Menu */
.category-nav .nav-item {
  position: relative;
}

.vertical-category-nav {
  background: rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 9998;
  padding-bottom: 2px;
}

.vertical-category-nav .category-header {
  background: var(--primary);
  color: var(--white);
  padding: 14px 20px;
  font-weight: 600;
  font-size: 0.95rem;
}

.vertical-category-nav .category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vertical-category-nav .category-item {
  position: relative;
  border-bottom: 1px solid #f0f0f0;
}

.vertical-category-nav .category-item:last-child {
  border-bottom: none;
}

.vertical-category-nav .category-item>a {
  display: block;
  padding: 12px 20px;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.vertical-category-nav .category-item>a i:first-child {
  width: 20px;
  color: var(--primary);
  margin-right: 10px;
}

.vertical-category-nav .category-item>a .float-end {
  color: #999;
  font-size: 0.75rem;
  line-height: 1.5;
}

.vertical-category-nav .category-item:hover>a {
  background: #f8f9fa;
  color: var(--primary);
}

.vertical-category-nav .sub-menu {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 600px;
  background: var(--white);
  border-left: 1px solid #e0e0e0;
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 9999;
}

.vertical-category-nav .category-item:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vertical-category-nav .sub-menu-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px;
}

.vertical-category-nav .menu-column h6 {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

.vertical-category-nav .menu-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vertical-category-nav .menu-column ul li a {
  display: block;
  padding: 6px 0;
  color: #555;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.vertical-category-nav .menu-column ul li a:hover {
  color: var(--primary);
  padding-left: 8px;
}

.hero-section .hero-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.hero-section .col-lg-9 {
  display: flex;
}

.mega-menu .menu-column h6 {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

.mega-menu .menu-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu .menu-column ul li {
  margin-bottom: 8px;
}

.mega-menu .menu-column ul li a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: block;
  padding: 4px 0;
}

.mega-menu .menu-column ul li a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.mega-menu .menu-column ul li a i {
  margin-right: 6px;
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 0;
  position: relative;
  overflow: visible;
  z-index: 100;
}

.hero-section>.container>.row {
  align-items: stretch;
}

.hero-section .col-lg-3 {
  padding: 0;
  display: flex;
}

.hero-section .vertical-category-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-section .vertical-category-nav .category-list {
  flex: 1;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: 200px;
}

.hero-section h1 {
  color: var(--white);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero-search {
  max-width: 600px;
  background: var(--white);
  border-radius: 50px;
  padding: 8px;
  display: flex;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.hero-search input {
  flex: 1;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 50px;
}

.hero-search input:focus {
  outline: none;
}

.hero-search .btn {
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
}

/* Cards */
.card {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  transition: all 0.3s;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.card-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 20px;
  font-weight: 600;
}

.product-card {
  background: var(--white);
}

.product-card .card-img-top {
  height: 200px;
  object-fit: cover;
  background: var(--gray-100);
}

.product-card .card-body {
  padding: 16px;
}

.product-card .product-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  height: 48px;
}

.product-card .product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.product-card .product-moq {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.product-card .supplier-name {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-top: 8px;
}

.product-card .supplier-name i {
  color: var(--secondary);
}

/* Badges */
.badge-verified {
  background: var(--secondary);
  color: var(--white);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.badge-cert {
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 3px;
  margin-right: 4px;
}

.badge-hot {
  background: var(--danger);
  color: var(--white);
}

.badge-new {
  background: var(--secondary);
  color: var(--white);
}

/* Supplier Card */
.supplier-card {
  background: var(--white);
  padding: 20px;
}

.supplier-card .supplier-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gray-100);
}

.supplier-card .supplier-info h5 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.supplier-card .supplier-meta {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.supplier-card .cert-badges {
  margin-top: 12px;
}

/* Stats Section */
.stats-section {
  background: var(--gray-900);
  padding: 60px 0;
  color: var(--white);
}

.stat-item {
  text-align: center;
}

.stat-item .stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
  display: block;
}

.stat-item .stat-label {
  font-size: 1rem;
  color: var(--gray-400);
}

/* Category Section */
.category-section {
  padding: 60px 0;
  background: var(--white);
}

.category-card {
  text-align: center;
  padding: 30px 20px;
  border-radius: 12px;
  background: var(--gray-100);
  transition: all 0.3s;
  text-decoration: none;
  color: var(--gray-900);
  display: block;
}

.category-card:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-5px);
}

.category-card .category-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}

.category-card:hover .category-icon {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.category-card h6 {
  font-weight: 600;
  margin-bottom: 5px;
}

.category-card p {
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.8;
}

/* Features Section */
.features-section {
  padding: 60px 0;
  background: var(--gray-100);
}

.feature-item {
  text-align: center;
  padding: 30px;
}

.feature-item .feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--white);
}

.feature-item h5 {
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-item p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 95, 180, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  border-color: var(--secondary);
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

/* Quick Inquiry Button */
.btn-inquiry {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-inquiry:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* Footer */
.main-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 60px 0 30px;
}

.main-footer h5 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.main-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-footer ul li {
  margin-bottom: 10px;
}

.main-footer ul li a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color 0.2s;
}

.main-footer ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 30px;
  margin-top: 40px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-800);
  border-radius: 50%;
  color: var(--gray-400);
  margin-right: 10px;
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

.trust-badges {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trust-badges img {
  height: 40px;
  filter: grayscale(50%);
  opacity: 0.8;
  transition: all 0.2s;
}

.trust-badges img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Filters Sidebar */
.filter-sidebar {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
}

.filter-group {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group h6 {
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--gray-900);
}

.filter-group .form-check {
  margin-bottom: 10px;
}

.filter-group .form-check-label {
  font-size: 0.9rem;
  color: var(--gray-700);
}

.filter-group .badge {
  font-size: 0.75rem;
  background: var(--gray-200);
  color: var(--gray-700);
}

/* Price Range */
.price-range-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.price-range-inputs input {
  width: 100px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Product List View */
.product-list-item {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  transition: all 0.3s;
}

.product-list-item:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.product-list-item .product-image {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-100);
}

.product-list-item .product-info {
  flex: 1;
}

.product-list-item .product-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

/* View Toggle */
.view-toggle .btn {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
}

.view-toggle .btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Pagination */
.pagination {
  gap: 5px;
}

.pagination .page-link {
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  padding: 10px 16px;
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 15px 0;
  margin: 0;
}

.breadcrumb-item a {
  color: var(--gray-600);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--gray-900);
}

/* Sidebar Dashboard */
.dashboard-sidebar {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.dashboard-sidebar .user-info {
  padding: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  text-align: center;
}

.dashboard-sidebar .user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 12px;
}

.dashboard-sidebar .sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-sidebar .sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  color: var(--gray-700);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.dashboard-sidebar .sidebar-menu li a:hover,
.dashboard-sidebar .sidebar-menu li a.active {
  background: var(--gray-100);
  color: var(--primary);
  border-left-color: var(--primary);
}

.dashboard-sidebar .sidebar-menu li a i {
  width: 24px;
  margin-right: 12px;
}

/* Dashboard Cards */
.dashboard-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  height: 100%;
}

.dashboard-card .card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
}

.dashboard-card .card-icon.primary {
  background: var(--primary);
}

.dashboard-card .card-icon.secondary {
  background: var(--secondary);
}

.dashboard-card .card-icon.accent {
  background: var(--accent);
}

.dashboard-card .card-icon.info {
  background: var(--info);
}

.dashboard-card .card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 12px 0 4px;
}

.dashboard-card .card-label {
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* Data Table */
.data-table {
  width: 100%;
}

.data-table thead th {
  background: var(--gray-100);
  padding: 14px 16px;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
  font-size: 0.9rem;
}

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: var(--gray-100);
}

/* Status Badges */
.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.processing {
  background: #cce5ff;
  color: #004085;
}

.status-badge.shipped {
  background: #d4edda;
  color: #155724;
}

.status-badge.completed {
  background: #26a269;
  color: #fff;
}

.status-badge.cancelled {
  background: #f8d7da;
  color: #721c24;
}

/* Chat Interface */
.chat-container {
  height: calc(100vh - 200px);
  display: flex;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.chat-sidebar {
  width: 300px;
  border-right: 1px solid var(--gray-200);
}

.chat-sidebar .chat-search {
  height: 80px;
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.chat-sidebar .chat-list {
  overflow-y: auto;
  height: calc(100% - 60px);
}

.chat-list-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.2s;
}

.chat-list-item:hover,
.chat-list-item.active {
  background: var(--gray-100);
}

.chat-list-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}

.chat-list-item .chat-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  margin-left: 12px;
}

.chat-list-item .chat-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item .chat-preview {
  font-size: 0.85rem;
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item .chat-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.chat-list-item .chat-time {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.chat-list-item .unread-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  height: 80px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--gray-100);
}

.message {
  max-width: 60%;
  margin-bottom: 16px;
}

.message.sent {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message .message-content {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  display: inline-block;
}

.message.received .message-content {
  background: var(--white);
  border-bottom-left-radius: 4px;
}

.message.sent .message-content {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message .message-time {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.message.sent .message-time {
  text-align: right;
}

.chat-input {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 25px;
  font-size: 0.95rem;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Order Tracking */
.tracking-timeline {
  position: relative;
  padding-left: 30px;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.tracking-step {
  position: relative;
  padding-bottom: 30px;
}

.tracking-step::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gray-300);
  border: 2px solid var(--white);
}

.tracking-step.completed::before {
  background: var(--secondary);
}

.tracking-step.current::before {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 95, 180, 0.2);
}

.tracking-step .step-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.tracking-step .step-time {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.tracking-step .step-desc {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-top: 8px;
}

/* Form Styles */
.form-control,
.form-select {
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 95, 180, 0.1);
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--gray-700);
}

.form-text {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px 20px;
}

.auth-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.auth-card .auth-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 40px;
  text-align: center;
  color: var(--white);
}

.auth-card .auth-header h2 {
  color: var(--white);
  margin-bottom: 8px;
}

.auth-card .auth-body {
  padding: 40px;
}

.social-login {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-login .btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--gray-500);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

.divider span {
  padding: 0 16px;
  font-size: 0.9rem;
}

/* Product Detail */
.product-gallery {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
}

.product-gallery .main-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: var(--gray-100);
  border-radius: 8px;
  margin-bottom: 16px;
}

.product-gallery .thumbnail-list {
  display: flex;
  gap: 10px;
}

.product-gallery .thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.product-gallery .thumbnail:hover,
.product-gallery .thumbnail.active {
  border-color: var(--primary);
}

.product-info-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
}

.product-info-card h1 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.price-section {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.price-section .current-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.price-section .price-range {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.price-tier-table {
  width: 100%;
  margin-top: 16px;
}

.price-tier-table th,
.price-tier-table td {
  padding: 10px 12px;
  text-align: center;
  border: 1px solid var(--gray-200);
}

.price-tier-table th {
  background: var(--gray-50);
  font-weight: 600;
}

/* Specifications Table */
.specs-table {
  width: 100%;
}

.specs-table tr td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.specs-table tr td:first-child {
  width: 40%;
  background: var(--gray-50);
  font-weight: 500;
  color: var(--gray-700);
}

/* Supplier Info Sidebar */
.supplier-sidebar {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
}

.supplier-sidebar .supplier-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
}

.supplier-sidebar .supplier-logo {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 16px;
}

.supplier-sidebar .supplier-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.supplier-sidebar .stat-item {
  text-align: center;
  padding: 12px;
  background: var(--gray-100);
  border-radius: 8px;
}

.supplier-sidebar .stat-item .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.supplier-sidebar .stat-item .label {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* Language Switcher */
.language-switcher {
  position: relative;
}

.language-switcher .dropdown-menu {
  min-width: 200px;
  padding: 8px;
}

.language-switcher .dropdown-item {
  padding: 10px 16px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switcher .dropdown-item:hover {
  background: var(--gray-100);
}

.language-switcher .dropdown-item .flag {
  width: 24px;
  height: 16px;
  border-radius: 2px;
}

.language-switcher .dropdown-item.active {
  background: var(--primary);
  color: var(--white);
}

/* Cart Page */
.cart-item {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.cart-item .item-image {
  width: 120px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-100);
}

.cart-item .item-info {
  flex: 1;
}

.cart-item .item-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.cart-item .item-meta {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.cart-item .quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item .quantity-control .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.cart-item .quantity-control input {
  width: 60px;
  text-align: center;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 6px;
}

.cart-summary {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
}

.cart-summary .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.cart-summary .summary-row:last-child {
  border-bottom: none;
}

.cart-summary .total-row {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 991px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .chat-container {
    flex-direction: column;
    height: auto;
  }

  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }

  .chat-sidebar .chat-list {
    height: 200px;
  }

  .chat-messages {
    height: 400px;
  }
}

@media (max-width: 767px) {
  .product-list-item {
    flex-direction: column;
  }

  .product-list-item .product-image {
    width: 100%;
    height: 200px;
  }

  .product-list-item .product-actions {
    flex-direction: row;
    width: 100%;
    margin-top: 16px;
  }

  .cart-item {
    flex-direction: column;
    text-align: center;
  }

  .cart-item .item-image {
    width: 100%;
    height: 150px;
  }
}

/* Utility Classes */
.text-primary {
  color: var(--primary) !important;
}

.text-secondary {
  color: var(--secondary) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.text-muted {
  color: var(--gray-600) !important;
}

.bg-primary {
  background-color: var(--primary) !important;
}

.bg-secondary {
  background-color: var(--secondary) !important;
}

.bg-light {
  background-color: var(--gray-100) !important;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .me-2 {
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}

[dir="rtl"] .ms-2 {
  margin-right: 0.5rem !important;
  margin-left: 0 !important;
}

[dir="rtl"] .pe-3 {
  padding-left: 1rem !important;
  padding-right: 0 !important;
}

[dir="rtl"] .ps-3 {
  padding-right: 1rem !important;
  padding-left: 0 !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}