/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a3a5c;
  --accent: #e8a020;
  --light: #f4f7fa;
  --dark: #222;
  --text: #444;
  --white: #fff;
  --border: #ddd;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-wrap img { height: 56px; }
.logo-text h1 {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}
.logo-text span { font-size: 0.8rem; color: #888; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 500;
  color: var(--dark);
  transition: all 0.2s;
}
.nav a:hover, .nav a.active { background: var(--primary); color: var(--white); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #2c6080 100%);
  color: var(--white);
  padding: 60px 0 50px;
  text-align: center;
}
.hero h2 { font-size: 2rem; margin-bottom: 12px; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 20px; }
.hero-line {
  width: 60px; height: 4px; background: var(--accent);
  margin: 0 auto 20px; border-radius: 2px;
}
.hero-badges {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-top: 20px;
}
.hero-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 16px; border-radius: 20px;
  font-size: 0.9rem;
}

/* ===== SECTIONS ===== */
.section { padding: 60px 0; }
.section-gray { background: var(--light); }
.section-title {
  text-align: center; margin-bottom: 40px;
}
.section-title h2 {
  font-size: 1.8rem; color: var(--primary);
  margin-bottom: 10px;
}
.section-title p { color: #888; }
.section-title::after {
  content: ""; display: block;
  width: 50px; height: 4px; background: var(--accent);
  margin: 12px auto 0; border-radius: 2px;
}

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 8px; }
.card-body p { font-size: 0.9rem; color: #666; }

/* ===== GALLERY (Install Cases) ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.gallery-item {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-item img { width: 100%; height: 220px; object-fit: cover; }
.gallery-item .gallery-caption {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 500;
}

/* ===== SERVICE 3 COL ===== */
.services-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.service-card {
  text-align: center;
  padding: 30px 20px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.service-card img { width: 64px; height: 64px; margin: 0 auto 16px; }
.service-card h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.1rem; }
.service-card p { font-size: 0.9rem; color: #666; }

/* ===== VIDEO ===== */
.video-wrap {
  max-width: 640px; margin: 0 auto;
  border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow);
}
.video-wrap iframe { width: 100%; aspect-ratio: 16/9; display: block; border: none; }

/* ===== PRODUCT TABLE ===== */
.product-table {
  width: 100%; border-collapse: collapse;
  background: var(--white);
  border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow);
}
.product-table th {
  background: var(--primary); color: var(--white);
  padding: 14px 16px; text-align: left;
  font-size: 0.95rem;
}
.product-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.product-table tr:last-child td { border-bottom: none; }
.product-table tr:hover td { background: var(--light); }

/* ===== QA ACCORDION ===== */
.qa-list { max-width: 800px; margin: 0 auto; }
.qa-item {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}
.qa-q {
  padding: 16px 20px;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}
.qa-q::after { content: "▼"; font-size: 0.7rem; }
.qa-a {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text);
  display: none;
}
.qa-item.open .qa-a { display: block; }
.qa-item.open .qa-q::after { content: "▲"; }

/* ===== FOOTER ===== */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer h3 { color: var(--white); margin-bottom: 12px; font-size: 1rem; }
.footer p, .footer li { font-size: 0.88rem; line-height: 1.8; }
.footer ul { list-style: none; }
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, #1a3a5c, #2c6080);
  color: var(--white);
  padding: 50px 0 40px;
  text-align: center;
}
.page-header h2 { font-size: 1.8rem; margin-bottom: 8px; }
.page-header p { opacity: 0.8; }

/* ===== LINE CTA ===== */
.line-cta {
  background: linear-gradient(135deg, #00b900, #00a000);
  color: var(--white);
  text-align: center;
  padding: 40px 0;
}
.line-cta h2 { font-size: 1.5rem; margin-bottom: 10px; }
.line-cta p { margin-bottom: 16px; opacity: 0.9; }
.line-btn {
  display: inline-block;
  background: var(--white);
  color: #00a000;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.2s;
}
.line-btn:hover { transform: scale(1.05); color: #007000; }

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--white);
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn:hover { background: #c8881a; color: var(--white); }

/* ===== PRODUCT DETAIL (2-col) ===== */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 768px) {
  .product-detail-grid { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .services-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 0.85rem; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .hero h2 { font-size: 1.5rem; }
  .product-table { font-size: 0.8rem; }
}
