/* =============================================
   高盈科技 官方網站 - 主樣式表
   品牌主色：中性藍 #2557a7
   ============================================= */

/* ===== CSS 變數 ===== */
:root {
  --primary:        #2557a7;
  --primary-dark:   #1a3f80;
  --primary-light:  #4a7bc8;
  --primary-bg:     #eff6ff;
  --primary-mid:    #bfdbfe;
  --secondary:      #0f172a;
  --text:           #374151;
  --text-light:     #6b7280;
  --border:         #e2e8f0;
  --bg-light:       #f8fafc;
  --white:          #ffffff;
  --success:        #16a34a;
  --danger:         #dc2626;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 28px rgba(0,0,0,0.13);
  --radius:         8px;
  --radius-lg:      14px;
  --transition:     0.22s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Microsoft JhengHei', 'Noto Sans TC', 'PingFang TC', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===== Typography ===== */
h1, h2, h3, h4 { color: var(--secondary); font-weight: 700; line-height: 1.3; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { line-height: 1.75; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--gray { background: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-light); font-size: 1.05rem; }
.section-header .subtitle {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* ===== Header / Nav ===== */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-mark {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.logo-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.35;
}
.logo-text span {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.93rem;
  transition: var(--transition);
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active {
  background: var(--primary-bg);
  color: var(--primary);
}
.nav-btn-contact {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: var(--radius) !important;
}
.nav-btn-contact:hover {
  background: var(--primary-dark) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--secondary);
  display: block;
  transition: var(--transition);
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-white {
  background: var(--white);
  color: var(--primary);
}
.btn-white:hover { background: var(--primary-bg); }
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: white; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-bg); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 14px 36px; font-size: 1rem; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  padding: 96px 0 80px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -5%;
  width: 550px;
  height: 550px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: 15%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 620px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.08rem;
  opacity: 0.88;
  margin-bottom: 36px;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== Category Cards ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.category-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px 22px;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.category-card__icon {
  width: 58px;
  height: 58px;
  background: var(--primary-bg);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}
.category-card h3 {
  font-size: 0.92rem;
  color: var(--secondary);
  margin-bottom: 6px;
}
.category-card__count {
  color: var(--text-light);
  font-size: 0.78rem;
}

/* ===== Product Cards ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-mid);
}
.product-card__img {
  height: 200px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}
.product-card__img .no-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.8rem;
}
.product-card__img .no-img svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}
.product-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card__category {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.product-card h3 { font-size: 1rem; margin-bottom: 6px; }
.product-card__model {
  color: var(--text-light);
  font-size: 0.82rem;
  margin-bottom: 10px;
  font-family: 'Courier New', monospace;
}
.product-card__desc {
  color: var(--text-light);
  font-size: 0.855rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
  flex: 1;
}
.product-card__footer { margin-top: auto; display: flex; gap: 10px; }

/* ===== Product Detail ===== */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.product-detail__img {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 90px;
}
.product-detail__img img { max-height: 320px; object-fit: contain; }
.product-detail__img .no-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
}
.product-detail__img .no-img svg { width: 80px; height: 80px; opacity: 0.2; }
.product-detail__category {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.product-detail__name { font-size: 1.8rem; margin-bottom: 8px; }
.product-detail__model {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
}
.product-detail__desc {
  color: var(--text);
  margin-bottom: 32px;
  line-height: 1.85;
  font-size: 0.95rem;
}
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.detail-tab {
  padding: 10px 22px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.detail-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 11px 14px; font-size: 0.9rem; }
.specs-table td:first-child {
  color: var(--text-light);
  width: 38%;
  font-weight: 500;
  background: var(--bg-light);
}
.features-list { list-style: none; }
.features-list li {
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  position: relative;
}
.features-list li:last-child { border-bottom: none; }
.features-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.product-detail__actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
}

/* ===== Page Banner ===== */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}
.page-banner h1 { color: var(--white); font-size: 2rem; }
.page-banner p { opacity: 0.85; margin-top: 10px; font-size: 1rem; }
.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  opacity: 0.7;
  margin-top: 14px;
}
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.breadcrumb-sep { opacity: 0.5; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-img-block {
  background: var(--primary-bg);
  border-radius: var(--radius-lg);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--primary);
  opacity: 0.4;
  position: relative;
  overflow: hidden;
}
.about-img-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.about-content h2 { margin-bottom: 20px; }
.about-content p { color: var(--text-light); margin-bottom: 16px; line-height: 1.85; font-size: 0.95rem; }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.stat-card {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 12px;
}
.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label { font-size: 0.78rem; color: var(--text-light); margin-top: 6px; }

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}
.value-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-mid); }
.value-card__icon {
  width: 50px;
  height: 50px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.value-card h3 { font-size: 1rem; margin-bottom: 10px; }
.value-card p { color: var(--text-light); font-size: 0.875rem; line-height: 1.7; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}
.contact-info h2 { margin-bottom: 20px; }
.contact-info p { color: var(--text-light); margin-bottom: 32px; line-height: 1.8; font-size: 0.95rem; }
.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  align-items: flex-start;
}
.contact-item__icon {
  width: 44px;
  height: 44px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-item__body strong {
  display: block;
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.contact-item__body span { color: var(--text-light); font-size: 0.875rem; }


/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 88px 0;
  text-align: center;
}
.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p { opacity: 0.88; margin-bottom: 36px; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Why Choose Us ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.why-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.why-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.why-card__icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  display: block;
}
.why-card h3 { font-size: 1rem; margin-bottom: 10px; }
.why-card p { color: var(--text-light); font-size: 0.86rem; line-height: 1.7; }

/* ===== Footer ===== */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-text span { color: rgba(255,255,255,0.45); }
.footer-desc { margin-top: 16px; font-size: 0.85rem; opacity: 0.65; line-height: 1.8; }
.footer-col h4 { color: var(--white); margin-bottom: 20px; font-size: 0.9rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: 0.85rem;
  opacity: 0.65;
  transition: var(--transition);
}
.footer-links a:hover { opacity: 1; color: var(--primary-mid); }
.footer-contact-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  opacity: 0.65;
  align-items: flex-start;
}
.footer-contact-row .icon { flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.45;
}

/* ===== Loading / Empty States ===== */
.loading-state {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state svg { width: 60px; height: 60px; opacity: 0.2; margin: 0 auto 16px; }
.empty-state p { font-size: 1rem; }

/* ===== Featured Badge ===== */
.badge-featured {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

/* ===== Skeleton Loader ===== */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .header-inner { position: relative; }

  .hero { padding: 60px 0 52px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .product-detail-grid { grid-template-columns: 1fr; }
  .product-detail__img { position: static; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .about-stats { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; align-items: center; }
}
