/* === 基礎設定 === */
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-image: linear-gradient(to bottom, #b4baa0, #949a7c); /* 第二份為主 */
  color: #333;
  padding-top: 100px; 
  padding-bottom: 80px;
  box-sizing: border-box;
  overflow-x: hidden;
  line-height: 1.4;
}

/* === Header 區塊 === */
header {
  background-color: #374b35ff;
  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: #949a7cff;
  color: white;
  font-weight: bold;
}

.header-buttons button:hover {
  background-color: #374b35ff;
  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: #949a7cff;
  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: #374b35ff;
  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: #374b35ff;
      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: #faf5eeff; /* 柔和的背景色 */
  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 p.text-center {
    text-align: center !important;
}
.content p.text-left {
    text-align: left !important;
}

.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: #374b35ff;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 700;
}

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


.content strong {
  color: #949a7cff;
  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: #70633cff;
  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, #949a7cff, #374b35ff
); /* 漸變綠色 */
  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, #949a7cff, #374b35ff); /* 深綠色變化 */
  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: #374b35ff; /* 文字顏色 */
  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, #949a7cff, #374b35ff); /* 深綠色變化 */
  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;
}

/* === 專屬設定：單列單商品大表格 === */
.product-table-single {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

/* 商品圖片限制 */
.product-table-single .table-prod-img {
    width: 100% !important;
    max-width: 180px !important; /* 電腦版限制大圖寬度 */
    height: auto !important;
    border-radius: 8px;
    object-fit: cover;
    margin: 10px auto !important;
    display: block;
}

/* 商品標題與規格 */
.product-table-single .prod-title {
    color: #374b35ff; /* 主題綠色 */
    margin: 0 0 5px 0;
    font-size: 18px;
}
.product-table-single .prod-spec {
    color: #666;
    font-size: 14px;
}

/* 功效清單排版（靠左對齊，方便閱讀） */
.product-table-single .prod-benefits-td {
    text-align: left !important;
    padding: 15px 20px;
}
.product-table-single .benefit-list {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.6;
}
.product-table-single .benefit-list li {
    margin-bottom: 6px;
}

/* 價格樣式 */
.product-table-single .prod-price {
    color: #584b27ff; /* 鮮明深紅色顯示價格 */
    font-weight: bold;
    font-size: 20px;
}
/* 建立一個包裹功效的容器，限制最大寬度 */
.product-table-single .benefits-wrapper {
    display: inline-block; /* 關鍵：讓容器寬度由文字長度決定 */
    text-align: left;      /* 關鍵：確保內部的文字依然齊頭靠左 */
}

/* 功效 ul 列表設定 */
.product-table-single .benefit-list {
    margin: 0;
    padding-left: 0;       /* 關鍵：徹底清除瀏覽器預設的清單內縮 */
    list-style: none;      /* 關鍵：徹底移除預設的黑色圓點 */
    display: inline-block; /* 關鍵：讓 ul 的寬度緊貼著最長的那行字 */
    text-align: left;      /* 關鍵：確保內部的 li 文字全部齊頭靠左 */
}

/* 控制每個 li 的樣式 */
.product-table-single .benefit-list li {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 8px;   /* 每個項目之間的垂直間距 */
}

.product-table-single .benefit-list li:last-child {
    margin-bottom: 0;
}


/* === 響應式：手機版（768px以下）自動轉為一欄大卡片 === */
@media screen and (max-width: 768px) {
    .product-table-single thead {
        display: none; 
    }
    .product-table-single, 
    .product-table-single tbody, 
    .product-table-single tr, 
    .product-table-single td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    /* 商品卡片外框：縮小底部間距與內襯 */
    .product-table-single tr {
        border: 2px solid #949a7cff;
        border-radius: 10px;
        margin-bottom: 5px; /* 縮小：卡片與卡片之間的距離從 30px 改為 15px */
        padding: 0%;        /* 縮小：內部留白縮小，讓卡片更緊湊 */
        background-color: #ffffff;
        box-shadow: 0 3px 6px rgba(0,0,0,0.05);
        display: flex;
        flex-direction: column; 
    }
    /* 卡片外框 */
    .product-table-single tr {
        border: 2px solid #949a7cff;
        border-radius: 12px;
        margin-bottom: 30px;
        overflow: hidden;
        background-color: #ffffff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    /* 手機版儲存格通用微調 */
    .product-table-single td {
        text-align: center !important; 
        border: none;
        
        padding: 15px;
    }
    .product-table-single td:last-child {
        border-bottom: none;
    }
    
    /* 關鍵新增：當切換到手機版卡片時，讓功效文字強制水平置中 */
    .product-table-single .prod-benefits-td {
        text-align: center !important;
    }
    .product-table-single .benefit-item {
        text-align: center !important; /* 確保每一行功效都完美置中 */
        margin: 0 0 10px 0;            /* 稍微加寬手機版的行距，比較好閱讀 */
    }
    
    /* 讓圖片在手機版放大 */
    .product-table-single .table-prod-img {
        max-width: 240px !important;
    }
}

/* 功效清單排版 */
.product-table-single .benefit-list {
    margin: 0;
    padding-left: 0; /* 修正：清除預設內縮，改由 li 自己控制空間 */
    font-size: 15px;
    line-height: 1;
    list-style: none; /* 關鍵：隱藏預設的黑色圓點 */
}

.product-table-single .benefit-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 28px; /* 留出左側空間放茶葉圖示 */
    text-align: left;   /* 確保文字靠左對齊 */
}

/* 新增：使用偽元素在每個 li 前面自動加上 🌿 */
.product-table-single .benefit-list li::before {
    content: "🌿";      /* 插入茶葉圖示 */
    position: absolute;
    left: 4px;          /* 控制茶葉與文字的距離 */
    top: 0;
}
/* 表單樣式 content-form */
.content-form {
  width: 85%;
  max-width: 300px;
  display: inline-block;
  text-align: center;
}

.content-form button {
  background-color: #584b27ff;
  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: #584b27ff;
}
.orderbtngroup.orderbtn-comfirm .orderbtn-void{
  background-color: #374b35ff;
}

.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: #374b35ff;
  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: #374b35ff;
  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: #00b900ff;
}

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

.order-btn {
  background-color: #584b27ff;
}

/* 頁腳 */
footer {
  background-color: #374b35ff;
  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;
}
