/* === 基礎設定 === */
html {
  scroll-behavior: smooth;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Serif TC', 'PingFang TC', 'Microsoft JhengHei', serif;
  margin: 0;
  padding: 0;
  background-color: #f5fff0; /* 第二份為主 */
  color: #333;
  padding-top: 100px; 
  padding-bottom: 80px;
  box-sizing: border-box;
  overflow-x: hidden;
  line-height: 1.4;
}

/* === Header 區塊 === */
header {
  background-color: #258628;
  display: flex;
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  align-items: center;
  padding: 0;
  justify-content: space-between;
  color: white;
}

.left-group {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

header h2 {
  color: white;
  margin-left: 10px; /* 與 LOGO 之間的距離 */
}

  /* 圖片內部填滿容器 */
header .logo {
  width: 10vw;
  min-width: 50px;
  max-width: 60px;
  border-radius: 50%;      /* 裁成圓形 */
  object-fit: cover;       /* 填滿容器，不留邊 */
  padding-left: 2px; 
}


.logo-gotohomepage {
  display: inline-block;
  margin: 0;
  padding: 0;
}

.logo-gotohomepage .submit {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}


/* Header 按鈕區 */
header .header-buttons {
  display: flex;
  gap: 10px;
}

header .header-buttons img {
  width: 20px;
  margin-right: 5px;
}

.header-buttons button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 55px;
  margin: 0 0 5px 0;
  padding: 6px 10px;
  font-size: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid #f9f9f9;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.header-buttons button.logout-button {
  border: none;
  width: 40px;
  height: 55px;
  background-color: brown;
  color: white;
  font-weight: bold;
}

.header-buttons button:hover {
  background-color: #258628;
  color: white;
  border-color: black;
  transform: scale(1.05);
}

.header-buttons button img {
  margin: 0 5px 0 0;
}

/* 手機版選單按鈕預設隱藏（大螢幕） */
.menu-icon {
  display: none;
  background: none;
  color: white;
  font-size: 30px;
  border: none;
  cursor: pointer;
  margin-right: 20px;
}

/* 手機滑出選單 */
.side-menu {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100%;
  background-color: #258628af;
  color: white;
  transition: left 0.3s ease;
  z-index: 2000;
  padding: 20px;
}

.side-menu.open {
  left: 0;
}

.side-menu .close-btn {
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  float: right;
}

.side-menu .menu-content {
  margin-top: 40px;
}

/* 響應式處理（小螢幕） */
@media (max-width: 768px) {
  header .header-buttons {
    display: none !important;
  }

  .menu-icon {
    display: block !important;
  }
}

.side-menu .menu-content form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  background-color: transparent;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  text-align: left;
}

.side-menu .menu-content form {
  padding: 0;
  margin: 0;
}

.side-menu .menu-content form button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 10px;
  background-color: #18521acf;
  border-radius: 8px;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  text-align: left;
}

.side-menu .menu-content form button img {
  width: 20px;
  height: 20px;
}




/* 分類導航 */
.category-nav {
  background-color: white;
  padding: 10px 20px;
  display: flex;
  gap: 30px;
  border-bottom: 1px solid #ddd;
}

.category-nav a {
  text-decoration: none;
  color: #555;
  transition: color 0.3s ease;
}

.category-nav a:hover {
  background-color: #258628;
  color: white;
  border-color: black;
  transform: scale(1.05);
  padding: 7px;
}

/* RWD 導航 */
@media screen and (max-width: 768px) {
  .category-nav {
      display: none;
      flex-direction: column;
      gap: 10px;
      position: fixed;
      top: 130px;
      left: 0px;
      background-color: white;
      width: fit-content;
      min-width: 200px;
      padding: 6px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      z-index: 999;
  }

  .category-nav.show {
      display: flex;
  }

  .category-toggle {
      display: block;
      position: fixed;
      left: 10px;
      background-color: #258628;
      color: white;
      border: solid 1px white;
      border-radius: 5px;
      cursor: pointer;
      z-index: 1000;
      width: fit-content;
  }

  .category-toggle img {
      width: 30px;
  }
}

@media screen and (min-width: 769px) {
  .category-nav {
      margin-top: 80px;
      display: flex;
      flex-direction: row;
      justify-content: center;
      gap: 20px;
      background-color: #f2f2f2;
      padding: 10px 0;
      position: static;
      width: 100%;
      box-shadow: none;
      border-radius: 0;
  }

  .category-nav a:not(:last-child) {
      border-right: 1px solid black;
      padding-right: 18px;
  }
}

/* 內容區塊 */

.content {
  background-color: #f9f9f9; /* 柔和的背景色 */
  border: 1px solid #e0e0e0; /* 邊框 */
  border-radius: 10px; /* 圓角 */
  padding: 20px 30px; /* 內距 */
  margin: 20px auto; /* 外距 */
  max-width: 800px; /* 最大寬度 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 陰影效果 */
  text-align: center;
 
}
.content-text img {
  width: 100%;
  min-width: 350px;
  border-radius: 10px; 
  height: auto;
  display: block;
  margin: 0;
}

.content img {
  width: 90%;
  border-radius: 10px; 
  height: auto;
  display: block;
  margin: 10px auto;
}

.content img.content-icon {
  width: 120px !important;
  min-width: 0 !important;
  max-width: none !important;
}

/* 畫廊 */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 20px 0;
}

.image-gallery img {
  width: 100%;
  height: 160px; /* 固定高度，讓圖片等高 */
  object-fit: cover; /* 自動裁切圖片內容 */
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* 手機裝置時微調圖片高度 */
@media (max-width: 600px) {
  .image-gallery img {
    height: 120px;
  }
}

/* 輪播畫廊 */
.scroll-gallery {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  display: flex;
  width: 100%;
  gap: 12px;
  padding: 10px 0;
  scrollbar-width: none;
  position: relative;
}

.scroll-gallery::-webkit-scrollbar {
  display: none;
}

.scroll-gallery-track {
  display: flex;
  gap: 12px;
  animation: scroll-left 30s linear infinite;
  will-change: transform;
}

.scroll-gallery:hover .scroll-gallery-track,
.scroll-gallery:active .scroll-gallery-track,
.scroll-gallery:focus-within .scroll-gallery-track {
  animation-play-state: paused;
}

.scroll-gallery-track img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  scroll-snap-align: start;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.scroll-gallery-track img:hover {
  transform: scale(1.05);
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ✅ 手機：圖片略小，保留輪播與滑動雙功能 */
@media (max-width: 768px) {
  .scroll-gallery-track img {
    width: 140px;
    height: 140px;
  }
}






.content.fb-page{
  width: 100%;
}
.content h2 {
  font-size: 24px;
  color: #4CAF50;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 700;
}

.content p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  text-align: justify; /* 文字對齊 */
  white-space: pre-line;
}


.content strong {
  color: #4CAF50;
  font-weight: bold;
}


.content p + p {
  margin-top: 15px;
}

.content label {
  font-weight: bold;
  display: block;
  margin-top: 10px;
}

.content  input, select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.content .checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 10px;
}
.content .checkbox-group input {
  width: auto;
  margin-right: 5px;
}

.content button {
  width: 100%;
  padding: 10px;
  margin-top: 15px;
  background: brown;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
.content button:hover {
  background:  rgb(69, 18, 18)5;
}

.content .green-button {
  width: 20%;
  background: linear-gradient(135deg, #28a745, #218838); /* 漸變綠色 */
  color: white; /* 文字顏色 */
  padding: 8px 10px; /* 內邊距 */
  font-size: 16px; /* 文字大小 */
  font-weight: bold; /* 加粗 */
  border: none; /* 移除邊框 */
  border-radius:16px 16px 0 0; /* 圓角 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* 陰影 */
  cursor: pointer; /* 滑鼠變手指 */
  transition: all 0.3s ease-in-out; /* 過渡動畫 */
  display: inline-block;
  text-align: center;
}

.content .green-button:hover {
  background: linear-gradient(135deg, #218838, #1e7e34); /* 深綠色變化 */
  transform: scale(1.05); /* 微放大 */
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3); /* 增強陰影 */
  color: white;
}

.content .green-button:active {
  transform: scale(0.98); /* 點擊時微縮小 */
}

.content .white-button {
  width: 20%;
  background: linear-gradient(135deg, #eaf0eb, #eef5f0); /* 漸變綠色 */
  color: #218838; /* 文字顏色 */
  padding: 8px 10px;
  font-size: 16px; /* 文字大小 */
  font-weight: bold; /* 加粗 */
  border: none; /* 移除邊框 */
  border-radius: 16px 16px 0 0; /* 圓角 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* 陰影 */
  cursor: pointer; /* 滑鼠變手指 */
  transition: all 0.3s ease-in-out; /* 過渡動畫 */
  display: inline-block;
  text-align: center;
}

.content .white-button:hover {
  background: linear-gradient(135deg, #218838, #1e7e34); /* 深綠色變化 */
  transform: scale(1.05); /* 微放大 */
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3); /* 增強陰影 */
  color: white;
}

.content .white-button:active {
  transform: scale(0.98); /* 點擊時微縮小 */
}

.content table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 18px;
}
.content th, td {
  border: 1px solid #ccc;
  padding: 10px;
}
.content th {
  background-color: #f4f4f4;
}

/* 表單樣式 content-form */
.content-form {
  width: 85%;
  max-width: 300px;
  display: inline-block;
  text-align: center;
}

.content-form button {
  background-color: brown;
  color: white;
  padding: 12px 24px;
  margin-top: 40px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

.content-form button:hover {
  background-color: rgb(69, 18, 18);
  color: white;
}

.responsive-iframe {
  position: relative;
  width: 100%;
  padding-top: 67.74%; /* 420 ÷ 620 ≈ 0.6774 → 高度比例 */
  overflow: hidden;
}

.responsive-iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.order table {
  font-size: 16px;
  line-height: 1.4; /* 調小行高 */
}
.orderbtngroup {
  display: flex;
  justify-content: center;
  gap: 10px; /* 按鈕間距 */
  flex-wrap: wrap; /* 若畫面太窄會自動換行 */
}
.orderbtngroup form {
  flex: 1 1 0; /* 填滿剩餘空間 */
  max-width: 300px; /* 單顆最大寬度 */
  min-width: 0; 
}
.orderbtngroup button {
  width: 100%; /* 填滿 form */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px; /* icon 與文字間距 */
  padding: 10px 16px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.orderbtngroup img {
  margin: 0 ;
}
.order td, .order th {
  padding: 4px 6px; /* 上下縮小 */
}
.order th {
  white-space: nowrap;
}
.order td {
  text-align: left;
  word-break: break-word; /* 🔹單字超長時換行 */
  white-space: normal;    /* 🔹讓 td 可以自動換行 */


}
.orderbtngroup .orderbtn-void {
  background-color: brown;
}
.orderbtngroup.orderbtn-comfirm .orderbtn-void{
  background-color: #218838;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.button-group button {
  flex: 1 1 auto;
  padding: 12px 24px;
  white-space: nowrap;
}
.breathing-button {

  
  border: none;
  border-radius: 8px;
  font-size: large;
  font-weight: bold;
  cursor: pointer;
  animation: breathing 2.5s ease-in-out infinite;
  transition: transform 0.3s;
}

@keyframes breathing {
  0%   { transform: scale(0.96); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(0.96); }
}

.allbtn{flex:1;
  text-align: center;}
.allbtn-icon img{
  width: 16px;    /* 跟字一樣高 */
  height: 16px;
  vertical-align: middle; }
  
/* 商品卡片按鈕樣式 */
.product-card .price {
  color: black;
  font-weight: bold;
  margin: 10px 0;
}

.product-card .add-to-cart {
  background-color: #258628;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  width: 100%;
  transition: background-color 0.3s ease;
}

.product-card .add-to-cart:hover {
  background-color: #258628;
  color: white;
  border-color: black;
}
/* 登入表單樣式 */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 20px;
  background-color: #f9f9f9;
  line-height: 1px;
}

.login-container form {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 30px 40px;
  width: 100%;
  max-width: 400px;
}

.login-container h2{
  margin:  40px auto 30px auto;
}
.login-container form input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}
.login-container select{
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}

.login-container form input:focus {
  border-color: #873dff;
  box-shadow: 0 0 5px rgba(135, 61, 255, 0.5);
}

.login-container form button {
  width: 100%;
  padding: 10px 15px;
  margin-top: 15px;
  background-color: #873dff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-container form button:hover {
  background-color: #622db8;
  transform: scale(1.05);
}

.login-container form button:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.login-container p {
  margin: 20px 0;
  color: #555;
  font-size: 14px;
}

.login-container a {
  color: #873dff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.login-container a:hover {
  color: #622db8;
}
/* 固定圓形按鈕 */
.floating-buttons {
  position: fixed;
  bottom: 8%;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 999;
}

.circle-button {
  width: 50px;
  height: 50px;
  background-color: white;
  border: 2px solid #ddd;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.circle-button img {
  width: 33px;
  height: 33px;
}

.circle-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.line-btn {
  background-color: #00C300;
}

.fb-btn {
  background-color: #1877f2;
}

.order-btn {
  background-color: brown;
}

/* 頁腳 */
footer {
  background-color: #258628;
  color: white;
  text-align: center;
  padding: 10px;
}

footer .footer-links a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
}

footer .footer-links a:hover {
  text-decoration: underline;
}
