/* =========================================================
   Fucheng - Electronic Components B2B Distributor
   Theme: Deep Blue #0559ad / White / #333 Text / Sans-serif
   ========================================================= */

:root {
  --primary: #0559ad;
  --primary-dark: #04427f;
  --primary-light: #e8f1fb;
  --dark-text: #333333;
  --muted-text: #666666;
  --light-bg: #f5f8fc;
  --border-color: #e3e8ef;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--dark-text);
  background: #ffffff;
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

/* ---------- Top Toolbar ---------- */
.top-bar {
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  padding: 6px 0;
}

.top-bar a {
  color: #ffffff;
}

.top-bar .toolbar-right span {
  margin-left: 18px;
}

.top-bar i {
  margin-right: 5px;
}

/* ---------- Navbar ---------- */
.navbar-fucheng {
  background: #ffffff;
  border-bottom: 3px solid var(--primary);
  padding: 0;
}

.navbar-fucheng .navbar-brand {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  padding: 12px 0;
}

.navbar-fucheng .navbar-brand .brand-ocean {
  color: #18a0e0;
}

.navbar-fucheng .navbar-brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-text);
  letter-spacing: 1px;
}

.navbar-fucheng .nav-link {
  color: #333333;
  font-weight: 600;
  padding: 18px 15px !important;
  text-transform: uppercase;
  font-size: 14px;
}

.navbar-fucheng .nav-link:hover,
.navbar-fucheng .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.navbar-toggler {
  border-color: var(--primary);
}

/* ---------- Buttons ---------- */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

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

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

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

/* ---------- Hero Carousel (CSS gradient simulation) ---------- */
.hero-carousel {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  min-height: 420px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.9s ease-in-out, visibility 0.9s ease-in-out;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 0%, transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 28%),
    radial-gradient(circle at 60% 80%, rgba(64,180,255,0.28) 0%, transparent 40%),
    linear-gradient(135deg, #021a33 0%, #0559ad 55%, #0a7fd0 100%);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: relative;
}

/* particle dots */
.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.hero-slide::before {
  width: 6px;
  height: 6px;
  top: 18%;
  left: 12%;
  box-shadow: 90px 60px 0 rgba(255,255,255,0.25), 220px 130px 0 rgba(255,255,255,0.18), 520px 40px 0 rgba(255,255,255,0.3), 640px 160px 0 rgba(255,255,255,0.2), 340px 240px 0 rgba(255,255,255,0.25), 1100px 90px 0 rgba(255,255,255,0.2);
}

.hero-slide::after {
  width: 3px;
  height: 3px;
  top: 60%;
  left: 30%;
  box-shadow: 200px -40px 0 rgba(255,255,255,0.2), 480px 60px 0 rgba(255,255,255,0.25), 700px -60px 0 rgba(255,255,255,0.2), 900px 120px 0 rgba(255,255,255,0.25), 1150px -20px 0 rgba(255,255,255,0.18);
}

.hero-slide h1 {
  font-size: 44px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-slide p {
  font-size: 18px;
  opacity: 0.95;
}

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.hero-dots span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  margin: 0 5px;
  cursor: pointer;
}

.hero-dots span.active {
  background: #ffffff;
}

/* ---------- Section Titles ---------- */
.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.section-subtitle {
  color: var(--muted-text);
  margin-bottom: 24px;
}

.section-title-line {
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 0 auto 8px auto;
}

/* ---------- Stat Bar ---------- */
.stat-bar {
  background: var(--primary);
  color: #ffffff;
  padding: 30px 0;
}

.stat-item {
  text-align: center;
  padding: 10px;
}

.stat-item i {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.stat-item .stat-num {
  font-size: 30px;
  font-weight: 700;
}

.stat-item .stat-label {
  font-size: 14px;
  opacity: 0.9;
}

/* ---------- Placeholder Blocks ---------- */
.placeholder-img {
  background: linear-gradient(135deg, #dbe9fa 0%, #b7d3ef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  border: 1px dashed #9db8d8;
  border-radius: 4px;
  min-height: 60px;
  text-align: center;
  padding: 8px;
}

.placeholder-logo {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8f98;
  font-weight: 700;
  min-height: 70px;
  transition: all 0.2s;
  text-align: center;
  padding: 10px;
  font-size: 14px;
}

.placeholder-logo:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(5, 89, 173, 0.12);
}

.placeholder-img-lg {
  background: linear-gradient(135deg, #e8f1fb 0%, #c3dcf5 100%);
  border: 1px dashed #9db8d8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  min-height: 180px;
  text-align: center;
  padding: 20px;
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 6px 18px rgba(5, 89, 173, 0.10);
}

.category-card {
  text-align: center;
  padding: 22px 10px;
  height: 100%;
}

.category-card i {
  font-size: 34px;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.category-card .cat-name {
  font-weight: 700;
  color: #333333;
}

.category-card .cat-count {
  font-size: 13px;
  color: var(--muted-text);
}

.category-card:hover .cat-name {
  color: var(--primary);
}

/* ---------- Big Category Panels ---------- */
.big-cat-panel {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  min-height: 240px;
  color: #ffffff;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.big-cat-panel .panel-title {
  font-size: 24px;
  font-weight: 700;
}

.big-cat-panel .panel-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  columns: 2;
  font-size: 13px;
}

.big-cat-panel .panel-list li {
  padding: 2px 0;
}

.big-cat-panel a {
  color: #ffffff;
}

.big-cat-panel a:hover {
  text-decoration: underline;
}

.big-cat-pcb {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.15) 0%, transparent 30%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 26px),
    linear-gradient(135deg, #023a6d 0%, #0559ad 100%);
}

.big-cat-connector {
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.18) 0%, transparent 32%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 3px, transparent 3px 22px),
    linear-gradient(135deg, #0a7fd0 0%, #0559ad 60%, #023a6d 100%);
}

.big-cat-power {
  background:
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.2) 0%, transparent 35%),
    linear-gradient(135deg, #04427f 0%, #0a5ea8 100%);
}

/* ---------- Tables ---------- */
.table thead {
  background: var(--primary);
  color: #ffffff;
}

.table thead th {
  border: none;
  font-size: 14px;
}

.table td {
  vertical-align: middle;
}

.pn-cell {
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Pagination ---------- */
.pagination .page-link {
  color: var(--primary);
}

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

/* ---------- Footer ---------- */
.site-footer {
  background: #05294a;
  color: #c9d6e4;
  padding-top: 44px;
}

.site-footer h5 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 16px;
}

.site-footer a {
  color: #c9d6e4;
}

.site-footer a:hover {
  color: #ffffff;
}

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

.site-footer ul li {
  padding: 4px 0;
}

.footer-social a {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  margin-right: 8px;
  color: #ffffff;
}

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

.footer-bottom {
  background: #021c33;
  color: #8fa3b8;
  font-size: 13px;
  padding: 14px 0;
  margin-top: 36px;
}

.footer-bottom a.footer-admin-link {
  font-size: 0.75rem;
  color: #5b7086;
  text-decoration: none;
}

.footer-bottom a.footer-admin-link:hover {
  color: #9bb0c6;
}

/* ---------- Forms ---------- */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(5, 89, 173, 0.15);
}

.contact-form-wrap {
  background: var(--primary-light);
  border: 1px solid #cfe1f3;
  border-radius: 8px;
  padding: 28px;
}

/* ---------- Page Hero (sub pages) ---------- */
.page-hero {
  background:
    radial-gradient(circle at 85% 25%, rgba(255,255,255,0.12) 0%, transparent 30%),
    linear-gradient(135deg, #023a6d 0%, #0559ad 70%, #0a7fd0 100%);
  color: #ffffff;
  padding: 48px 0;
}

.page-hero h1 {
  font-size: 34px;
  font-weight: 700;
}

.page-hero .breadcrumb {
  background: transparent;
  margin-bottom: 0;
}

.page-hero .breadcrumb-item a,
.page-hero .breadcrumb-item {
  color: rgba(255, 255, 255, 0.8);
}

.page-hero .breadcrumb-item.active {
  color: #ffffff;
}

/* ---------- Manufacturer alpha index ---------- */
.alpha-index {
  text-align: center;
}

.alpha-index a {
  display: inline-block;
  min-width: 34px;
  padding: 5px 6px;
  margin: 3px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--primary);
  font-weight: 700;
}

.alpha-index a:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.mfr-grid .placeholder-logo {
  min-height: 86px;
  font-size: 15px;
}

/* ---------- Quote table ---------- */
.quote-table input {
  min-width: 90px;
}

/* ---------- Tabs ---------- */
.nav-tabs .nav-link {
  color: var(--dark-text);
  font-weight: 600;
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  border-top: 3px solid var(--primary);
}

/* ---------- Map placeholder ---------- */
.map-placeholder {
  background:
    linear-gradient(rgba(5, 89, 173, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 89, 173, 0.06) 1px, transparent 1px),
    #eef4fb;
  background-size: 40px 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .hero-slide h1 {
    font-size: 28px;
  }

  .hero-carousel {
    min-height: 320px;
  }

  .stat-item .stat-num {
    font-size: 22px;
  }

  .section-title {
    font-size: 22px;
  }

  .top-bar .toolbar-right {
    display: none;
  }

  .big-cat-panel {
    min-height: 200px;
    margin-bottom: 16px;
  }

  .table-responsive {
    font-size: 13px;
  }

  .navbar-fucheng .nav-link {
    padding: 10px 15px !important;
  }
}

/* ---------- Large Screen Auto Fill (viewport-relative) ---------- */
/* 使用视口相对宽度，确保任何分辨率/系统缩放下容器都不超过屏幕，内容完整展示 */
@media (min-width: 1200px) {
  .container {
    max-width: calc(100% - 48px);
  }
}
@media (min-width: 1600px) {
  .container {
    max-width: calc(100% - 64px);
  }
}
@media (min-width: 2000px) {
  .container {
    max-width: calc(100% - 80px);
  }
}
/* 兜底：任何情况下容器不超出视口 */
.container {
  max-width: 100%;
}
