/* ==============================
   神港電機 — style.css
   Bootstrap 5 + Custom Design System
============================== */

/* ─── CSS Variables ────────────────────────── */
:root {
  --red: #C8102E;
  --red-dark: #9b0d23;
  --red-light: #fff0f2;
  --navy: #0d1b2a;
  --navy-mid: #1a2e42;
  --steel: #2d4a6b;
  --gray-50: #f8f9fa;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all .25s ease;
}

/* ─── Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans TC', 'Barlow', sans-serif;
  color: #1a1a1a;
  background: #fff;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ─── Top Bar ────────────────────────────────── */
.topbar {
  background: var(--navy);
  padding: 6px 0;
  font-size: 12px;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lang-switch { display: flex; gap: 12px; }
.lang-switch a {
  color: rgba(255,255,255,.6);
  transition: var(--transition);
  padding: 2px 6px;
}
.lang-switch a.active, .lang-switch a:hover { color: #fff; }
.topbar-contact { display: flex; gap: 20px; }
.topbar-contact a {
  color: rgba(255,255,255,.7);
  transition: var(--transition);
}
.topbar-contact a:hover { color: #fff; }
.topbar-contact i { margin-right: 4px; }

/* ─── Header ─────────────────────────────────── */
#mainHeader {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-bottom: 2px solid var(--gray-200);
}
.navbar { padding: 0; height: 64px; }

/* Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-right: 32px;
}
.logo-shinko {
  font-family: 'Barlow', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 28px;
  color: var(--red);
  line-height: 1;
}
.logo-zh {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: 1px;
}

/* Nav Links */
.navbar-nav .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700) !important;
  padding: 0 14px !important;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--red) !important;
  border-bottom-color: var(--red);
}

/* Mega Dropdown */
.mega-dropdown { position: static !important; }
.mega-menu {
  width: 100%;
  left: 0;
  right: 0;
  border-radius: 0;
  border-top: 2px solid var(--red);
  padding: 20px 0;
  box-shadow: var(--shadow-md);
}
.mega-link {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: var(--transition);
}
.mega-link:hover {
  background: var(--red-light);
  color: var(--red);
}

/* Regular Dropdown */
.dropdown-menu {
  border: none;
  border-top: 2px solid var(--red);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  min-width: 180px;
}
.dropdown-item {
  font-size: 13px;
  color: var(--gray-700);
  padding: 8px 16px;
  transition: var(--transition);
}
.dropdown-item:hover {
  background: var(--red-light);
  color: var(--red);
}

/* Nav Actions */
.btn-search {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-700);
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
}
.btn-search:hover { color: var(--red); }
.btn-inquiry {
  background: var(--red);
  color: #fff !important;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-inquiry:hover { background: var(--red-dark); color: #fff !important; }
.navbar-toggler { border: none; font-size: 24px; color: var(--navy); }
.navbar-toggler:focus { box-shadow: none; }

/* Search Bar */
.search-bar {
  background: var(--navy);
  padding: 12px 0;
  display: none;
  position: sticky;
  top: 64px;
  z-index: 998;
}
.search-bar.open { display: block; }
.search-form { display: flex; gap: 8px; align-items: center; }
.search-input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}
.search-input:focus { outline: 2px solid var(--red); }
.btn-search-close { background: none; border: none; color: rgba(255,255,255,.7); font-size: 20px; cursor: pointer; }

/* Mobile Nav */
.offcanvas { max-width: 300px; }
.offcanvas-header { background: var(--navy); }
.offcanvas-title { color: #fff; font-weight: 700; }
.mobile-nav-list { list-style: none; padding: 0; margin: 0; }
.mobile-nav-list > li { border-bottom: 1px solid var(--gray-200); }
.mobile-nav-list a,
.mobile-collapse-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
}
.mobile-nav-list a:hover,
.mobile-collapse-btn:hover { color: var(--red); }
.mobile-nav-list .collapse a {
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 400;
}

/* ─── Breadcrumb ─────────────────────────────── */
.breadcrumb-wrap {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 0;
}
.breadcrumb { margin: 0; font-size: 13px; }
.breadcrumb-item a { color: var(--gray-500); }
.breadcrumb-item.active { color: var(--gray-700); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray-500); }

/* ─── Page Hero (Inner Pages) ────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
  color: #fff;
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(200,16,46,.1);
  pointer-events: none;
}
.page-hero-img {
  width: 100%; height: 280px;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: .25;
}
.page-hero h1 {
  font-family: 'Barlow', sans-serif;
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}
.page-hero p {
  font-size: 16px;
  color: rgba(255,255,255,.8);
  max-width: 560px;
  line-height: 1.8;
  position: relative;
}

/* ─── Section Utilities ──────────────────────── */
section { padding: 72px 0; }
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Barlow', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 14px;
}
.section-desc {
  font-size: 16px;
  color: var(--gray-500);
  line-height: 1.8;
  max-width: 600px;
}
.bg-light-gray { background: var(--gray-50); }
.bg-navy { background: var(--navy); color: #fff; }

/* ─── Buttons ────────────────────────────────── */
.btn-primary-red {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary-red:hover { background: var(--red-dark); color: #fff; }
.btn-outline-navy {
  border: 2px solid var(--navy);
  color: var(--navy);
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

/* ─── Hero Slider ─────────────────────────────── */
.hero-slider { position: relative; }
.hero-slide {
  min-height: 520px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,27,42,.80) 0%, rgba(13,27,42,.35) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 600px;
  padding: 40px 0;
}
.hero-label {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 2px;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Barlow', sans-serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,.85);
  line-height: 1.8;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero-outline {
  border: 2px solid rgba(255,255,255,.6);
  color: #fff;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  transition: var(--transition);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; color: #fff; }
.carousel-indicators [data-bs-target] {
  width: 28px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.5);
  border: none;
}
.carousel-indicators .active { background: var(--red); }
.carousel-control-prev, .carousel-control-next {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  margin: auto 16px;
  opacity: 1;
}
.carousel-control-prev:hover, .carousel-control-next:hover { background: var(--red); }

/* ─── Stats Bar ──────────────────────────────── */
.stats-bar { background: var(--red); color: #fff; padding: 32px 0; }
.stat-item { text-align: center; padding: 12px 20px; border-right: 1px solid rgba(255,255,255,.2); }
.stat-item:last-child { border-right: none; }
.stat-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}
.stat-lbl { font-size: 13px; color: rgba(255,255,255,.8); margin-top: 4px; }

/* ─── Product Card ────────────────────────────── */
.product-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--red);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.product-card-img {
  height: 220px;
  overflow: hidden;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.product-card-name {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-card-model { font-size: 12px; color: var(--gray-500); margin-bottom: 10px; }
.product-card-desc { font-size: 13px; color: var(--gray-500); line-height: 1.6; flex: 1; }
.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* ─── Product Detail ─────────────────────────── */
.product-sidebar {
  position: sticky;
  top: 80px;
}
.product-sidebar-section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.product-sidebar-title {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}
.product-sidebar-link:last-child { border-bottom: none; }
.product-sidebar-link:hover { color: var(--red); background: var(--red-light); padding-left: 20px; }
.product-sidebar-link.active { color: #fff; background: var(--red); font-weight: 700; }

.product-main-img {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 24px;
  background: var(--gray-50);
  text-align: center;
}
.product-main-img img { max-height: 320px; object-fit: contain; }
.product-cat-tag {
  display: inline-block;
  background: var(--red-light);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 2px;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.product-name {
  font-family: 'Barlow', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 8px;
}
.product-tagline { font-size: 14px; color: var(--gray-500); margin-bottom: 16px; }
.product-desc { font-size: 14px; line-height: 1.8; color: var(--gray-700); margin-bottom: 24px; }
.btn-inquiry-cart {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 4px;
  border: none;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-inquiry-cart:hover { background: var(--red-dark); }

.product-features {
  display: flex;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}
.product-feature {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid var(--gray-200);
}
.product-feature:last-child { border-right: none; }
.product-feature .feat-icon { font-size: 24px; margin-bottom: 6px; }
.product-feature .feat-title { font-size: 12px; font-weight: 700; color: var(--navy); }
.product-feature .feat-desc { font-size: 11px; color: var(--gray-500); }

/* Product Tabs */
.product-tabs .nav-tabs { border-bottom: 2px solid var(--gray-200); }
.product-tabs .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 18px;
}
.product-tabs .nav-link.active {
  color: var(--red);
  border-bottom-color: var(--red);
  background: none;
}
.product-tabs .tab-content { padding: 24px 0; }

/* Spec Table */
.spec-table { width: 100%; }
.spec-table tr { border-bottom: 1px solid var(--gray-200); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th {
  width: 160px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  vertical-align: middle;
}
.spec-table td { padding: 12px 16px; font-size: 13px; color: var(--gray-700); }

/* Download Cards */
.dl-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  transition: var(--transition);
}
.dl-card:hover { border-color: var(--red); background: var(--red-light); }
.dl-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.dl-card-icon.pdf { background: #fee2e2; }
.dl-card-icon.zip { background: #dbeafe; }
.dl-card-icon.manual { background: #d1fae5; }
.dl-card-title { font-weight: 600; font-size: 14px; color: var(--navy); }
.dl-card-meta { font-size: 12px; color: var(--gray-500); }
.dl-card-btn {
  margin-left: auto;
  width: 36px; height: 36px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: var(--transition);
}
.dl-card:hover .dl-card-btn { background: var(--red); }

/* Related Products Slider */
.related-products { overflow: hidden; position: relative; }
.related-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}
.related-scroll::-webkit-scrollbar { display: none; }
.related-item {
  flex: 0 0 160px;
  scroll-snap-align: start;
  text-align: center;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: var(--transition);
}
.related-item:hover { border-color: var(--red); }
.related-item img { width: 80px; height: 80px; object-fit: contain; margin-bottom: 10px; }
.related-item-name { font-size: 12px; font-weight: 600; color: var(--navy); }
.related-item-series { font-size: 11px; color: var(--gray-500); }

/* ─── Tech / News Card ───────────────────────── */
.article-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-200);
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--red);
}
.article-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.article-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.article-card:hover .article-card-img img { transform: scale(1.05); }
.article-tag {
  position: absolute;
  bottom: 12px; left: 12px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
}
.article-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.article-card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-title:hover { color: var(--red); }
.article-card-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-500);
}
.article-card-meta i { margin-right: 3px; }

/* ─── Tech Page Sidebar ──────────────────────── */
.tech-sidebar {
  position: sticky;
  top: 80px;
}
.tech-sidebar-section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.tech-sidebar-title {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
}
.tech-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}
.tech-cat-link:last-child { border-bottom: none; }
.tech-cat-link:hover { color: var(--red); background: var(--red-light); }
.tech-cat-link.active { color: #fff; background: var(--red); }
.tech-support-box {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.tech-support-box h5 { font-weight: 700; margin-bottom: 10px; font-size: 15px; }
.tech-support-box p { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 16px; }
.tech-phone { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 700; color: var(--red); }

/* ─── Industries Page ────────────────────────── */
.industry-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--steel) 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.industry-hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .2;
}
.industry-hero-content { position: relative; z-index: 1; }
.flow-steps { display: flex; gap: 0; flex-wrap: nowrap; }
.flow-step {
  flex: 1;
  text-align: center;
  padding: 20px 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-right: none;
  position: relative;
  transition: var(--transition);
}
.flow-step:last-child { border-right: 1px solid var(--gray-200); }
.flow-step::after {
  content: '▶';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 12px;
  z-index: 1;
}
.flow-step:last-child::after { display: none; }
.flow-step:hover { background: var(--navy); color: #fff; }
.flow-step:hover .flow-num { background: var(--red); color: #fff; }
.flow-step:hover .flow-lbl { color: rgba(255,255,255,.6); }
.flow-num {
  width: 32px; height: 32px;
  background: var(--red-light);
  color: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 14px;
  margin: 0 auto 10px;
  transition: var(--transition);
}
.flow-icon { font-size: 26px; margin-bottom: 6px; }
.flow-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.flow-lbl { font-size: 11px; color: var(--gray-500); transition: var(--transition); }

.industry-grid-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
}
.industry-grid-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.industry-grid-card:hover img { transform: scale(1.06); }
.industry-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,27,42,.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  transition: var(--transition);
}
.industry-grid-card:hover .industry-card-overlay {
  background: linear-gradient(to top, rgba(200,16,46,.85) 0%, rgba(13,27,42,.3) 70%);
}
.industry-card-icon { font-size: 28px; margin-bottom: 6px; }
.industry-card-name {
  font-family: 'Barlow', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.industry-card-desc { font-size: 12px; color: rgba(255,255,255,.75); margin-bottom: 10px; }
.industry-card-more {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
}
.industry-grid-card:hover .industry-card-more { opacity: 1; transform: none; }

/* ─── News & Downloads ───────────────────────── */
.news-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-btn {
  padding: 7px 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ─── Contact Page ───────────────────────────── */
.contact-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.contact-form-group { margin-bottom: 18px; }
.contact-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.contact-form-group input,
.contact-form-group textarea,
.contact-form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}
.contact-form-group input:focus,
.contact-form-group textarea:focus,
.contact-form-group select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.1);
}
.contact-form-group textarea { min-height: 130px; resize: vertical; }
.office-card { border-left: 4px solid var(--red); }
.office-name { font-weight: 700; font-size: 16px; color: var(--navy); margin-bottom: 10px; }
.office-info { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--gray-700); margin-bottom: 6px; }
.office-info i { color: var(--red); flex-shrink: 0; margin-top: 2px; }

/* ─── Footer ─────────────────────────────────── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.7); margin-top: auto; }
.footer-main { padding: 56px 0 40px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.footer-desc { font-size: 13px; line-height: 1.8; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 16px;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--red); color: #fff; }
.footer-heading { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.6); transition: var(--transition); }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contacts { list-style: none; padding: 0; margin: 0 0 12px; }
.footer-contacts li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.footer-contacts i { color: var(--red); flex-shrink: 0; margin-top: 2px; }
.footer-branch { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 4px; margin-bottom: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  font-size: 12px;
  color: rgba(255,255,255,.4);
}
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: rgba(255,255,255,.4); transition: var(--transition); }
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ─── Admin Notice ────────────────────────────── */
.alert-success { background: #d1fae5; color: #065f46; border: none; border-radius: var(--radius); }
.alert-danger { background: #fee2e2; color: #991b1b; border: none; border-radius: var(--radius); }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 992px) {
  .hero-title { font-size: 34px; }
  .hero-slide { min-height: 420px; }
  .section-title { font-size: 28px; }
  .stat-val { font-size: 32px; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.2); }
  .stat-item:last-child { border-bottom: none; }
  .flow-steps { flex-wrap: wrap; }
  .flow-step { flex: 0 0 calc(33.33% - 8px); border-right: 1px solid var(--gray-200) !important; }
  .product-features { flex-wrap: wrap; }
  .product-feature { flex: 0 0 50%; }
}
@media (max-width: 768px) {
  section { padding: 48px 0; }
  .topbar-contact { display: none; }
  .hero-title { font-size: 28px; }
  .hero-slide { min-height: 360px; }
  .page-hero h1 { font-size: 28px; }
  .flow-step { flex: 0 0 calc(50% - 6px); }
  .flow-step::after { display: none; }
  .spec-table th { width: 110px; }
  .product-features { flex-wrap: wrap; }
  .product-feature { flex: 0 0 50%; border-bottom: 1px solid var(--gray-200); }
}
@media (max-width: 480px) {
  .hero-title { font-size: 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions a { width: 100%; text-align: center; justify-content: center; }
  .flow-step { flex: 0 0 100%; }
}

/* ─── Scroll Reveal ──────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ─── CKEditor output styles ─────────────────── */
.ck-content h2, .content-body h2 { font-family: 'Barlow', sans-serif; font-size: 24px; font-weight: 700; color: var(--navy); margin: 28px 0 14px; }
.ck-content h3, .content-body h3 { font-size: 20px; font-weight: 700; color: var(--navy); margin: 22px 0 12px; }
.ck-content p, .content-body p { margin-bottom: 14px; line-height: 1.9; font-size: 15px; }
.ck-content ul, .ck-content ol, .content-body ul, .content-body ol { padding-left: 22px; margin-bottom: 14px; }
.ck-content li, .content-body li { margin-bottom: 6px; font-size: 15px; line-height: 1.8; }
.ck-content img, .content-body img { max-width: 100% !important; height: auto !important; aspect-ratio: auto !important; border-radius: var(--radius); margin: 12px 0; }
.ck-content, .content-body { overflow-x: auto; }
.ck-content table, .content-body table { max-width: 100%; }
.site-logo { height: 20px; width: auto; object-fit: contain; margin-right: 6px; }
/* ─────────────────────────────────────────────
   全站分頁樣式：一般頁碼白底黑字，目前頁紅底白字
   ───────────────────────────────────────────── */
.pagination .page-link {
  color: var(--gray-700, #334155);
  background: #fff;
  border: 1px solid var(--gray-200, #e2e8f0);
  font-weight: 600;
  font-size: 13px;
}
.pagination .page-link:hover {
  color: var(--red);
  background: var(--red-light, #fdf2f2);
  border-color: var(--red);
}
.pagination .page-item.active .page-link {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.pagination .page-item.disabled .page-link {
  color: var(--gray-400, #cbd5e1);
  background: #fff;
  border-color: var(--gray-200, #e2e8f0);
}

/* ═══════════════════════════════════════════════════════════
   2026-08 客戶回饋修正
   統一放在檔案最後，覆寫前面的規則，方便日後辨識與回溯
   ═══════════════════════════════════════════════════════════ */

/* ── 06 / 10 產品卡片圖片不要被裁切 ──────────────
   原本是 object-fit: cover，會把圖填滿並裁掉超出的部分，
   產品外觀（面板、按鍵、接點）被切到會看不出規格差異，
   所以改成 contain 完整顯示，四周留白。
   卡片高度本來就是固定的，不會因此跑版。 */
.product-card-img {
  background: #fff;
  padding: 14px;
}
.product-card-img img {
  object-fit: contain;
}

/* ── 04 最新消息／技術專區內文，麵包屑下方留白縮小 ──
   全站 section 預設 padding: 72px 0，這兩頁上方顯得太空。
   只改上內距，下方維持原本間距不動。 */
.article-detail-section {
  padding-top: 28px;
}

/* ── 08 編輯器內容裡的影片自適應寬度 ──────────────
   CKEditor 貼進來的 YouTube 是固定 width/height 的 iframe，
   在手機上會超出畫面。這裡統一改成滿版 16:9，
   前台（.content-body）與後台編輯器（.ck-content）都套用，
   以後每一篇文章都不用再手動處理。 */
.ck-content iframe,
.content-body iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* ── 手機版隱藏區塊（≤768px）────────────────────
   用 display:none 隱藏不影響 SEO：
   內容仍完整存在於 HTML 原始碼中，搜尋引擎照樣讀得到。 */
@media (max-width: 768px) {

  /* 07 首頁輪播圖下方的兩顆按鈕 */
  .hero-actions { display: none !important; }

  /* 09 頁尾「快速連結」與「產品分類」兩欄 */
  .footer-nav-col { display: none !important; }

  /* 13 技術專區側邊的「技術諮詢專線」區塊 */
  .tech-phone-box { display: none !important; }
}
