:root {
  --container: 1175px;
  --gap: 16px;
  --gray: #f5f5f5;
  --line: #e1e1e1;
  --muted: #7a7a7a;
  --orange: #cd7f32;
  --green: #0a8f55;
  --red: #d00;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', 'Microsoft JhengHei', Arial, sans-serif;
  color: #222;
  line-height: 1.6;
  background: #fff;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 12px;
}

.highlight { color: #ff7a00; }
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.muted, .muted a { color: var(--muted); }
.full-img { width: 100%; height: auto; }
.sr-only { position: absolute; left: -9999px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.header-inner {
  display: grid;
  grid-template-columns: 212px 1fr 240px;
  align-items: center;
  gap: var(--gap);
}

.brand-logo {
  max-height: 56px;
  height: auto;
  max-width: 180px;
  height: auto;
  display: block;
}

.header-title .page-keyword {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.share-icons { display: flex; gap: 6px; }
.share-pill {
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.quick-links { display: flex; gap: 10px; }
.qlink { font-size: 12px; color: #111; text-decoration: none; }
.qlink:hover { text-decoration: underline; }

/* Navigation */
.site-nav { border-top: 1px solid var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0;
}
.nav-item img { display: block; height: 24px; }
.nav-div {
  display: inline-block;
  width: 48px;
  height: 23px;
  background: url('images/com-menu-div.gif') no-repeat center/contain;
}

/* Hero */
.hero { width: 100%; }
.hero-img { width: 100%; height: auto; display: block; }

/* Main layout */
.site-main {
  display: grid;
  grid-template-columns: 211px 1fr 221px;
  gap: var(--gap);
  padding: 16px 0;
}

/* Sidebar */
.sidebar.left, .sidebar.right {
  background: var(--gray);
  border-right: 1px solid #ddd;
  padding: 12px;
}

/* Boxes */
.box {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd;
}
.box-title { margin-bottom: 10px; }

/* Responsive */
@media (max-width: 1200px) {
  .container { max-width: 100%; }
  .site-main { grid-template-columns: 1fr; }
  .sidebar.left, .sidebar.right { border-right: none; }
  .header-inner { grid-template-columns: 1fr; row-gap: 8px; }
  .header-actions { align-items: flex-start; }
  .nav-inner { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .header-inner { grid-template-columns: 1fr; }
  .hero-img { width: 100%; }
}

/* Product grid (首頁縮圖) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 8px 0;
}
@media (min-width: 1280px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1600px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Hot products in 4 columns with dotted vertical separators */
.product-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 185px);
  justify-content: space-around;
  row-gap: 24px;
  padding: 10px 0;
}
.product-grid-4 .product-item {
  width: 185px;
  overflow: hidden;
  text-align: center;
  position: relative;
  padding: 0 10px;
}
.product-grid-4 .product-item img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #dcdcdc;
  padding: 2px;
  background: #fff;
}
.product-grid-4 .product-item:not(:nth-child(4n))::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  border-right: 1px dotted #cfcfcf;
}
.product-grid-4 .product-item .caption {
  margin-top: 6px;
  font-size: 12px;
}

/* 其他常用輔助樣式可依需求補充 */