:root {
  --navy: #0f2c4c;
  --navy-dark: #0a1e33;
  --orange: #e8890c;
  --orange-dark: #c96f00;
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1d2933;
  --text-muted: #5b6b78;
  --border: #e2e6ea;
  --radius: 10px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { padding-left: 1.2em; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.narrow { max-width: 780px; }

/* Header */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--orange);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--navy-dark);
  font-weight: 900;
}
.logo-text { display: flex; flex-direction: column; font-size: 17px; line-height: 1.2; }
.logo-text small { font-weight: 400; font-size: 11px; color: #b7c3cf; letter-spacing: .03em; }
.footer-logo { color: #fff; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: #dbe4ec;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14.5px;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-nav a.nav-cta {
  background: var(--orange);
  color: #1a1a1a;
  font-weight: 700;
  margin-left: 4px;
}
.main-nav a.nav-cta:hover { background: var(--orange-dark); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: #fff; display: block; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 72px 0 84px;
}
.hero-inner { text-align: center; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 18px; line-height: 1.35; }
.hero-sub { color: var(--orange); font-size: 0.55em; display: inline-block; margin-top: 8px; font-weight: 500; }
.hero-desc { max-width: 640px; margin: 0 auto 32px; color: #c4d1dc; font-size: 16px; }
.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto 28px;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 14px 20px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.hero-search button {
  border: none;
  background: var(--orange);
  color: #1a1a1a;
  font-weight: 700;
  padding: 0 28px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
}
.hero-search button:hover { background: var(--orange-dark); color: #fff; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-lg { padding: 14px 30px; font-size: 15.5px; }
.btn-primary { background: var(--orange); color: #1a1a1a; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.hero .btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); }

/* Sections */
.section { padding: 56px 0; }
.section-title { font-size: 26px; margin: 0 0 28px; text-align: center; color: var(--navy); }

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.category-card:hover { box-shadow: 0 10px 26px rgba(15,44,76,.12); transform: translateY(-2px); }
.category-card h3 { margin: 0 0 10px; color: var(--navy); font-size: 20px; }
.category-card p { color: var(--text-muted); font-size: 14.5px; margin: 0 0 16px; }
.category-count {
  display: inline-block;
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.card-arrow { display: block; margin-top: 14px; color: var(--orange-dark); font-weight: 700; font-size: 14px; }

/* Product grid & cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: 0 10px 24px rgba(15,44,76,.12); transform: translateY(-2px); }
.product-thumb {
  aspect-ratio: 4 / 3;
  background: #eef1f4;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 10px;
}
.product-card-body { padding: 16px; }
.product-category { font-size: 12px; color: var(--orange-dark); font-weight: 700; }
.product-card-body h3 { font-size: 16px; margin: 6px 0; color: var(--navy); }
.product-brand { font-size: 13px; color: var(--text-muted); margin: 0; }
.product-excerpt { font-size: 13px; color: var(--text-muted); margin: 8px 0 0; }
.section-cta { text-align: center; margin-top: 32px; }

/* About teaser */
.about-teaser-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.link-more { color: var(--orange-dark); font-weight: 700; }
.contact-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
}
.contact-card h3 { margin-top: 0; }
.contact-card p { color: #c4d1dc; font-size: 14.5px; }

/* Breadcrumb */
.breadcrumb { padding: 18px 20px 0; font-size: 13.5px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--navy); }

/* Category header */
.category-header h1 { color: var(--navy); margin-bottom: 8px; }
.category-header p { color: var(--text-muted); max-width: 680px; }

/* Product detail */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.product-media img, .product-media-placeholder {
  width: 100%;
  border-radius: var(--radius);
}
.product-media-placeholder {
  aspect-ratio: 1;
  background: #eef1f4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted);
  gap: 8px;
  text-align: center;
  padding: 20px;
}
.product-category-tag {
  display: inline-block;
  background: var(--bg);
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.product-info h1 { margin: 0 0 10px; color: var(--navy); font-size: 28px; }
.product-brand-line { color: var(--text-muted); margin: 0 0 20px; }
.info-block { margin-bottom: 22px; }
.info-block h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 0 0 6px; }
.info-block p { margin: 0; }
.price-note {
  background: #fff6e9;
  border: 1px solid #f3d9a8;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 28px;
}
.price-note p { margin: 0 0 14px; color: #7a5510; }

.related-section { background: #fff; border-top: 1px solid var(--border); }

/* Search page */
.search-hint { color: var(--text-muted); }
.search-box { margin: 24px 0 8px; }
#search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}
.search-filters { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-muted);
}
.filter-chip.active, .filter-chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.search-count { color: var(--text-muted); font-size: 14px; margin: 18px 0 14px; }
.search-empty { color: var(--text-muted); padding: 30px 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; }
.contact-info h1 { color: var(--navy); }
.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.branch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.branch-card h3 { color: var(--navy); font-size: 18px; margin: 0 0 6px; }
.branch-card .btn { margin-top: 8px; }
.contact-list-large { list-style: none; padding: 0; margin: 10px 0; }
.contact-list-large a { color: var(--orange-dark); font-weight: 700; }
.contact-list-large li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.contact-list-large strong { color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.note { color: var(--text-muted); font-size: 13px; font-style: italic; }
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.contact-form label { font-size: 13.5px; font-weight: 700; color: var(--navy); display: flex; flex-direction: column; gap: 6px; }
.contact-form input, .contact-form textarea {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}
.form-note { font-size: 12.5px; color: var(--text-muted); font-weight: 400; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #c4d1dc; margin-top: 40px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 48px 20px 28px;
}
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a:hover { color: #fff; }
.contact-list { font-size: 13.5px; }
.footer-branch { margin-bottom: 14px; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px;
  font-size: 12.5px;
  text-align: center;
}

/* Responsive */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--navy);
    padding: 10px 20px 20px;
  }
  .about-teaser-inner, .product-detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
