/* ===============================
   全域設定
=============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  font-family: "微軟正黑體", sans-serif;
  background-color: #fff;
  scroll-behavior: smooth;
  overflow-x: auto; /* 保留橫向滑動 */
}

/* ===============================
   Header
=============================== */
header {
  font-weight: bold;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: #e8a349;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 2000;
}

header h1 {
  width: 260px;
  height: 70px;
  background: url(../images/logo.svg) no-repeat left center;
  background-size: auto 180%;
  text-indent: -9999px;
}

header h1 a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===============================
   Navigation
=============================== */
nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

nav li {
  position: relative;
}

nav a {
  display: block;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-size: 16px;
  transition: all 0.2s ease-in-out;
}

nav a:hover {
  text-decoration: underline;
  color: #ffeabf;
}

/* ===============================
   Dropdown Menu
=============================== */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 3000;
}

.dropdown-content a {
  color: #333;
  padding: 10px 16px;
}

.dropdown-content a:hover {
  background-color: #f2f2f2;
  color: #000;
}

li.dropdown:hover .dropdown-content {
  display: block;
}

/* ===============================
   Main 區域
=============================== */
main {
  min-height: calc(100vh - 80px - 80px); /* 預留 header + footer */
  margin-top: 80px;
  padding-bottom: 80px; /* 避免 footer 遮住內容 */
  width: 100%;
}

/* ===============================
   首頁專區
=============================== */
.news {
  padding-top: 0;
  height: 50vh;
  background: url(../images/banner2.png) center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.news h2 {
  font-size: clamp(28px, 5vw, 60px);
}

.news p {
  color: #fef716;
  margin-top: 20px;
  font-size: clamp(14px, 2vw, 18px);
}

.slogan {
  background-color: #485652;
  color: white;
  padding: 50px 20px;
  text-align: center;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8em;
}

.rich {
  display: flex;
  flex-wrap: wrap;
}

.rich img {
  width: 50%;
  min-width: 300px;
}

.info {
  width: 50%;
  min-width: 300px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.info h2 {
  font-size: clamp(24px, 4vw, 40px);
  margin-bottom: 20px;
}

.info p {
  text-align: center;
  line-height: 2em;
  font-size: clamp(14px, 2vw, 16px);
}

/* ===============================
   關於 / 聯絡我們
=============================== */
.about-page,
.contact-page {
  width: 100%;
  min-height: calc(100vh - 80px - 80px); /* 預留 header/footer */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 100px; /* header 高度補償 */
}

.about-page {
  background-image: url(../images/Kaoshiung-2.jpg);
  color: white;  
}

.about-page h2 {
  font-size: clamp(24px, 4vw, 40px);
  margin-bottom: 20px;
}

.about-page p {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 2em;
  margin-bottom: 10px;
}

.contact-page {
  background-image: url(../images/service.png);
  background-position: top center;
  color: #000;
}

.contact-page h2 {
  font-size: clamp(24px, 4vw, 40px);
  margin-bottom: 20px;
}

.contact-page p {
  font-weight: bold;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 2em;
  margin-bottom: 10px;
}

/* ===============================
   產品頁通用版型
=============================== */
.product-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 160px;
  background-color: #ede9db;
  width: 100%;
  box-sizing: border-box;
}

/* 左欄（標題與說明） */
.product-left {
  padding-top: 20px;
  padding-left: 20px;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.product-left h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.product-left p {
  font-size: 14px;
  line-height: 1.8em;
}

.product-left ul {
  margin-top: 10px;
  padding-left: 20px;
  list-style-type: disc;
}

.product-left li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6em;
}

/* 右欄（產品） */
.product-right {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  padding: 20px 20px;
}

.product-item {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}

.product-item:hover {
  transform: translateY(-5px);
}

.product-item img {
  height: 140px;
  object-fit: contain;
  margin-bottom: 10px;
}

.product-item h3 {
  font-size: 16px;
  margin: 10px 0;
}

.product-item p {
  font-size: 14px;
  line-height: 1.6em;
}

/* ===============================
   Footer
=============================== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: #000;
  color: #b7b7b7;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  z-index: 2000;
}

/* ===============================
   響應式調整
=============================== */
@media (max-width: 1024px) {
  .product-page {
    grid-template-columns: 1fr; /* 單欄 */
    padding-left: 20px;
    padding-right: 20px;
  }

  .product-left,
  .product-right {
    padding-left: 0;
    padding-right: 0;
  }

  .product-left h2,
  .product-left p,
  .product-left ul,
  .product-left li {
    text-align: left;
  }

  .about-page,
  .contact-page {
    padding-top: 140px; /* 補 header 高度 */
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 10px 20px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
  }

  .rich {
    flex-direction: column;
  }

  .rich img {
    width: 100%;
    height: auto;
  }

  .info {
    width: 100%;
    padding: 20px;
    text-align: center;
  }

  main {
    margin-top: 120px; /* 補 header */
    padding-bottom: 80px;
  }

  .product-right {
    grid-template-columns: 1fr;
  }

  .product-left h2,
  .product-left p,
  .product-left ul,
  .product-left li {
    text-align: left;
  }
}

@media (max-width: 480px) {
  main {
    margin-top: 140px;
  }

  .contact-page h2 {
    margin-top: 160px;
  }

  .product-page {
    padding-left: 15px;
    padding-right: 15px;
  }
}

