:root {
  --primary: #1f7a3e;
  --primary-dark: #145a2c;
  --accent: #6cb83a;
  --text: #2b2f2c;
  --muted: #6b746e;
  --bg: #ffffff;
  --bg-alt: #f3f8f2;
  --border: #e1ebe0;
  --radius: 10px;
  --max: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html, body { overflow-x: hidden; }
body { font-family: "Noto Sans TC", sans-serif; color: var(--text); background: var(--bg); line-height: 1.8; -webkit-text-size-adjust: 100%; overflow-wrap: anywhere; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.en { font-family: "Montserrat", sans-serif; letter-spacing: .08em; }

/* ===== Header ===== */
header { position: fixed; inset: 0 0 auto 0; z-index: 100; background: rgba(255,255,255,.97); box-shadow: 0 1px 0 var(--border); transition: box-shadow .3s; }
header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 20px; }
.logo img { height: 50px; width: auto; }
.menu { display: flex; gap: 30px; list-style: none; }
.menu a { display: flex; flex-direction: column; align-items: center; font-size: 15px; font-weight: 500; line-height: 1.3; position: relative; padding: 6px 0; white-space: nowrap; }
.menu a span.en { font-size: 10px; color: var(--muted); }
.menu a::after { content: ""; position: absolute; bottom: -4px; left: 50%; width: 0; height: 2px; background: var(--accent); transition: .3s; transform: translateX(-50%); }
.menu a:hover::after, .menu a.active::after { width: 100%; }
.menu a.active { color: var(--primary); }
.lang-switch, .menu-lang { display: inline-flex; border: 1px solid var(--border); border-radius: 30px; padding: 3px; font-size: 13px; white-space: nowrap; }
.lang-switch a, .menu-lang a { padding: 3px 12px; border-radius: 30px; color: var(--muted); transition: .2s; }
.lang-switch a.on, .menu-lang a.on { background: var(--primary); color: #fff; }
.lang-switch a:not(.on):hover { color: var(--primary); }
.menu-lang { display: none; }
.lang-en .menu { gap: 24px; }
.burger { display: none; background: none; border: 0; cursor: pointer; width: 32px; height: 24px; position: relative; }
.burger span { position: absolute; left: 0; width: 100%; height: 2px; background: var(--primary); transition: .3s; }
.burger span:nth-child(1) { top: 0; } .burger span:nth-child(2) { top: 11px; } .burger span:nth-child(3) { top: 22px; }
.burger.open span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* ===== Hero ===== */
.hero { min-height: 100vh; padding-top: 80px; display: flex; align-items: center; color: #fff; position: relative; overflow: hidden;
  background-color: var(--primary-dark); background-position: center; background-size: cover; background-repeat: no-repeat; }
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero .en { font-size: 14px; opacity: .85; margin-bottom: 18px; display: block; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.35; font-weight: 700; margin-bottom: 20px; }
.hero p { font-size: 18px; opacity: .92; margin-bottom: 36px; }
.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 12px; opacity: .75; z-index: 1; animation: bob 2s infinite; color: #fff; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* Page banner (subpages) */
.page-banner { padding: 150px 0 70px; color: #fff; text-align: center; background-color: var(--primary-dark); background-position: center 40%; background-size: cover; background-repeat: no-repeat; }
.page-banner .en { font-size: 13px; opacity: .85; display: block; }
.page-banner h1 { font-size: clamp(28px, 4vw, 40px); margin-top: 6px; }
.crumbs { font-size: 13px; opacity: .8; margin-top: 10px; }
.crumbs a:hover { text-decoration: underline; }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 13px 34px; border-radius: 40px; font-weight: 500; transition: .3s; border: 2px solid transparent; cursor: pointer; font-size: 15px; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--primary); transform: translateY(-2px); }
.btn-primary:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; margin-left: 12px; }
.btn-ghost:hover { background: #fff; color: var(--primary); }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ===== Sections ===== */
section { padding: 100px 0; }
.alt { background: var(--bg-alt); }
.sec-title { text-align: center; margin-bottom: 56px; }
.sec-title .en { color: var(--accent); font-size: 13px; font-weight: 700; display: block; margin-bottom: 6px; }
.sec-title h2 { font-size: 34px; color: var(--primary); font-weight: 700; }
.sec-title h2::after { content: ""; display: block; width: 50px; height: 3px; background: var(--accent); margin: 14px auto 0; }
.center { text-align: center; margin-top: 40px; }
.link-more { color: var(--primary); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: .3s; }
.link-more:hover { color: var(--accent); gap: 10px; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: 0 20px 40px rgba(20,90,44,.15); }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about h3 { font-size: 26px; color: var(--primary); margin-bottom: 18px; line-height: 1.5; }
.about p { color: var(--muted); margin-bottom: 16px; }
.slogan { font-size: 20px; font-weight: 700; color: var(--accent); margin: 10px 0 24px; }
.industries { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.industries span { padding: 6px 16px; border-radius: 30px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--primary); font-size: 14px; }

/* Values / feature grid */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 28px; text-align: center; transition: .3s; }
.value:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(20,90,44,.1); }
.value .icon { font-size: 36px; margin-bottom: 12px; }
.value h3 { color: var(--primary); font-size: 20px; margin-bottom: 8px; }
.value p { color: var(--muted); font-size: 15px; }

/* News */
.news-list { list-style: none; max-width: 900px; margin: 0 auto; }
.news-list li { border-bottom: 1px solid var(--border); }
.news-list a { display: flex; gap: 24px; align-items: center; padding: 22px 10px; transition: .3s; }
.news-list a:hover { background: #fff; padding-left: 20px; color: var(--primary); }
.tag { font-size: 12px; padding: 2px 12px; border-radius: 20px; background: rgba(108,184,58,.15); color: var(--primary); white-space: nowrap; }
.news-title { flex: 1; }
.article { max-width: 860px; margin: 0 auto 70px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.article:last-child { margin-bottom: 0; }
.article-img { aspect-ratio: 16/8; overflow: hidden; }
.article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 34px 40px 40px; }
.article-body h2 { color: var(--primary); font-size: 24px; line-height: 1.5; margin: 10px 0 16px; }
.article-body p { color: var(--muted); margin-bottom: 14px; }
.article-body ul { color: var(--muted); margin: 0 0 18px 20px; }

/* Products */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: .35s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(20,90,44,.12); }
.card-img { aspect-ratio: 1/1; overflow: hidden; background: var(--bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card-body .en { font-size: 11px; color: var(--accent); }
.card-body h3 { font-size: 20px; color: var(--primary); margin: 4px 0 10px; }
.card-body p { font-size: 14px; color: var(--muted); flex: 1; margin-bottom: 14px; }

/* Product category detail rows */
.cat-row { display: grid; grid-template-columns: 360px 1fr; gap: 50px; align-items: center; padding: 60px 0; border-bottom: 1px solid var(--border); }
.cat-row:last-child { border-bottom: 0; }
.cat-row:nth-child(even) { grid-template-columns: 1fr 360px; }
.cat-row:nth-child(even) .cat-img { order: 2; }
.cat-img { border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 30px rgba(20,90,44,.12); }
.cat-row .en { color: var(--accent); font-size: 12px; font-weight: 700; }
.cat-row h2 { color: var(--primary); font-size: 28px; margin: 4px 0 14px; }
.cat-row p { color: var(--muted); margin-bottom: 14px; }
.cat-row ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.cat-row li { font-size: 13px; padding: 4px 14px; border-radius: 20px; background: var(--bg-alt); color: var(--primary); border: 1px solid var(--border); }

/* Plabaria */
.pla-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.pla-intro img { border-radius: var(--radius); box-shadow: 0 20px 40px rgba(0,0,0,.12); }
.pla-intro h2 { font-size: 32px; color: var(--primary); line-height: 1.4; margin-bottom: 8px; }
.pla-intro .catch { font-size: 22px; color: var(--accent); font-weight: 700; margin-bottom: 18px; }
.pla-intro p { color: var(--muted); margin-bottom: 14px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.compare-box { background: #fff; border-radius: var(--radius); padding: 30px; border: 1px solid var(--border); }
.compare-box h3 { color: var(--primary); margin-bottom: 14px; font-size: 20px; }
.compare-box li { list-style: none; padding-left: 26px; position: relative; margin-bottom: 10px; color: var(--muted); }
.compare-box li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.spec { width: 100%; max-width: 760px; margin: 0 auto; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.spec th, .spec td { padding: 16px 22px; border-bottom: 1px solid var(--border); text-align: left; }
.spec th { background: var(--primary); color: #fff; font-weight: 500; }
.spec td:last-child { font-family: "Montserrat"; color: var(--primary); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; width: 100%; cursor: zoom-in; transition: .3s; }
.gallery img:hover { transform: scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,.15); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 300; padding: 20px; cursor: zoom-out; }
.lightbox.show { display: flex; }
.lightbox img { max-height: 90vh; border-radius: 6px; }

/* CTA band */
.band { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 70px 0; text-align: center; }
.band h2 { font-size: 28px; margin-bottom: 10px; }
.band p { opacity: .85; margin-bottom: 26px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; }
.contact-info h3 { font-size: 24px; color: var(--primary); margin-bottom: 14px; }
.contact-info > p { color: var(--muted); margin-bottom: 26px; }
.info-item { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.info-item .ic { width: 42px; height: 42px; border-radius: 50%; background: rgba(108,184,58,.15); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.info-item small { display: block; color: var(--muted); font-size: 12px; }
.info-item a:hover { color: var(--accent); }
.map { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map iframe { width: 100%; height: 240px; border: 0; display: block; }
form.contact-form { background: #fff; padding: 36px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(20,90,44,.08); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field label i { color: #d9534f; font-style: normal; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 15px; background: var(--bg-alt); transition: .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.agree { font-size: 13px; color: var(--muted); margin-bottom: 20px; display: flex; gap: 8px; align-items: center; }
.agree a { color: var(--primary); text-decoration: underline; }
.hp { position: absolute; left: -9999px; }
.form-msg { margin-top: 14px; font-size: 14px; display: none; }
.form-msg.ok { color: var(--primary); display: block; }
.form-msg.err { color: #d9534f; display: block; }

/* Prose (privacy) */
.prose { max-width: 860px; margin: 0 auto; }
.prose h2 { color: var(--primary); font-size: 22px; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--muted); margin-bottom: 10px; }
.prose ul { margin-left: 22px; }

/* Footer */
footer { background: #0f2a18; color: rgba(255,255,255,.72); padding: 60px 0 0; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
footer h4 { color: #fff; margin-bottom: 14px; font-size: 16px; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a:hover { color: var(--accent); }
.foot-logo { background: #fff; display: inline-block; padding: 8px 14px; border-radius: 8px; margin-bottom: 14px; }
.foot-logo img { height: 40px; width: auto; }
.copy { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }

.to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; font-size: 20px; cursor: pointer; opacity: 0; pointer-events: none; transition: .3s; box-shadow: 0 6px 16px rgba(0,0,0,.2); z-index: 90; }
.to-top.show { opacity: 1; pointer-events: auto; }

.reveal { opacity: 0; transform: translateY(30px); transition: .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Additions ===== */
.hero { min-height: 100svh; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btns .btn-ghost { margin-left: 0; }
.text p { color: var(--muted); margin-bottom: 16px; }
.news-date { font-family: "Montserrat", sans-serif; color: var(--muted); font-size: 14px; min-width: 92px; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; list-style: none; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card-img.wide { aspect-ratio: 16/10; }
.meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.article-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.cat-nav { position: sticky; top: 80px; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); }
.cat-nav .container { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cat-nav .container::-webkit-scrollbar { display: none; }
.cat-nav a { flex-shrink: 0; padding: 6px 16px; border-radius: 30px; border: 1px solid var(--border); font-size: 14px; color: var(--primary); white-space: nowrap; transition: .2s; }
.cat-nav a:hover { background: var(--primary); color: #fff; }
.cat-section { padding-top: 20px; }
.cat-row { scroll-margin-top: 150px; }
.cat-row p { color: var(--muted); }
.table-wrap { max-width: 760px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.spec { max-width: none; border-radius: 0; }
.agree span { line-height: 1.6; }
.agree input { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--primary); }
.contact-info a { word-break: break-all; }
.map iframe { max-width: 100%; }
input, textarea, button { font-size: 16px; } /* iOS 不會自動放大 */

/* Captcha */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; min-width: 0; letter-spacing: .3em; }
.captcha-row input::placeholder { letter-spacing: normal; }
.captcha-img { width: 150px; height: 50px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; flex-shrink: 0; background: #eef4ec; }
.captcha-refresh { width: 44px; height: 50px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--primary); font-size: 22px; cursor: pointer; transition: .2s; }
.captcha-refresh:hover { background: var(--bg-alt); transform: rotate(90deg); }

/* Map */
.map-section { padding-top: 90px; }
.map-card { display: grid; grid-template-columns: 1fr 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 14px 34px rgba(20,90,44,.1); background: #fff; }
.map-frame { min-height: 420px; background: var(--bg-alt); }
.map-frame iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
.map-info { padding: 36px 30px; display: flex; flex-direction: column; justify-content: center; }
.map-info h3 { color: var(--primary); font-size: 22px; margin-bottom: 14px; }
.map-info p { color: var(--muted); margin-bottom: 8px; }
.map-info a:hover { color: var(--accent); }
.map-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.map-btns .btn { text-align: center; padding: 11px 20px; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .burger { display: block; }
  .lang-switch { display: none; }
  .menu { position: fixed; top: 80px; left: 0; right: 0; max-height: calc(100vh - 80px); overflow-y: auto; background: #fff; flex-direction: column; gap: 0; padding: 6px 20px 24px; box-shadow: 0 10px 20px rgba(0,0,0,.08); transform: translateY(-130%); visibility: hidden; transition: transform .35s, visibility .35s; z-index: -1; }
  .menu.open { transform: none; visibility: visible; }
  .menu a { flex-direction: row; align-items: baseline; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--border); white-space: normal; }
  .menu a::after { display: none; }
  .menu-lang { display: inline-flex; margin-top: 18px; }
  .menu-lang a { padding: 6px 20px; border-bottom: 0; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .about, .contact, .pla-intro, .compare { grid-template-columns: 1fr; gap: 36px; }
  .products, .values { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cat-row, .cat-row:nth-child(even) { grid-template-columns: 1fr; gap: 26px; padding: 44px 0; }
  .cat-row:nth-child(even) .cat-img { order: 0; }
  .cat-img { max-width: 320px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .map-card { grid-template-columns: 1fr; }
  .map-frame, .map-frame iframe { min-height: 320px; }
  .map-info { padding: 24px 20px; }
  .map-btns { flex-direction: row; flex-wrap: wrap; }
  .map-btns .btn { flex: 1 1 160px; }
}
@media (max-width: 600px) {
  section { padding: 64px 0; }
  .container { padding: 0 16px; }
  .nav { height: 64px; }
  .logo img { height: 38px; }
  .menu { top: 64px; max-height: calc(100vh - 64px); }
  html { scroll-padding-top: 74px; }
  .cat-nav { top: 64px; }
  .cat-row { scroll-margin-top: 130px; }
  .hero { padding-top: 64px; }
  .hero p { font-size: 16px; }
  .hero .btn { flex: 1 1 auto; text-align: center; }
  .page-banner { padding: 110px 0 48px; }
  .sec-title { margin-bottom: 36px; }
  .sec-title h2 { font-size: 26px; }
  .about h3, .contact-info h3 { font-size: 22px; }
  .pla-intro h2 { font-size: 24px; }
  .cat-row h2 { font-size: 22px; }
  .cat-img { max-width: 100%; }
  .products, .values, .row, .foot-grid, .news-grid { grid-template-columns: 1fr; }
  .products { gap: 20px; }
  .card-img { aspect-ratio: 16/10; }
  .gallery { gap: 10px; }
  .news-list a { flex-wrap: wrap; gap: 6px 12px; padding: 18px 4px; }
  .news-list a:hover { padding-left: 4px; }
  .news-title { flex-basis: 100%; }
  form.contact-form { padding: 22px 18px; }
  .article-body { padding: 22px 18px 26px; }
  .article-body h2 { font-size: 20px; }
  .compare-box { padding: 22px 18px; }
  .band { padding: 54px 0; }
  .band h2 { font-size: 22px; }
  .copy { flex-direction: column; text-align: center; }
  /* 規格表改成卡片式 */
  .spec thead { display: none; }
  .spec, .spec tbody, .spec tr, .spec td { display: block; width: 100%; }
  .spec tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
  .spec td { border: 0; padding: 4px 16px; display: flex; gap: 12px; }
  .spec td::before { content: attr(data-label); flex: 0 0 64px; color: var(--muted); font-family: "Noto Sans TC", sans-serif; font-weight: 400; }
  .captcha-img { width: 120px; height: 40px; }
  .captcha-refresh { width: 40px; height: 40px; font-size: 18px; }
  .captcha-row { gap: 8px; }
  .map-section { padding-top: 64px; }
  .map-frame, .map-frame iframe { min-height: 280px; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}
