/* ==========================================================================
   開開鳥嘴 - style.css
   原生 CSS3，未使用任何框架。Layout 以 Flexbox 為主。
   ========================================================================== */

:root {
  --color-text: #2b2b2b;
  --color-text-light: #555;
  --color-border: #333;
  --color-blue: #2b6cb0;
  --color-bg-soft: #eeeeee;
  --color-bg-card: #e9e9e9;
  --color-white: #ffffff;
  --header-height: 68px;
  --max-width: 1240px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC",
    "Noto Sans CJK TC", "Heiti TC", "WenQuanYi Zen Hei", "Helvetica Neue",
    Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 內容於大螢幕下置中，並保留左右內距。
   body 是 column flex container，子元素的 cross-axis auto margin 會蓋過
   預設的 align-items:stretch（CSS 規範行為），若不給 width:100%，.container
   會依照自己內容的多寡各自 shrink-to-fit，導致不同 section 寬度對不齊
   （即使 max-width 設的值一樣）。加上 width:100% 讓它先撐滿，再用
   max-width 限制、margin:auto 置中，寬度才會是穩定、不受內容影響的定值。 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   1. Header
   ========================================================================== */

.site-header {
  height: var(--header-height);
  border-bottom: 1px solid #e2e2e2;
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* 左側 Logo */
.logo-badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-nav {
  flex: 1;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 32px;
}

.main-nav a {
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: var(--color-blue);
}

.header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-login {
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-login:hover {
  background: var(--color-text);
  color: var(--color-white);
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text);
  padding: 0;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--color-blue);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.cart-count:empty {
  display: none;
}

/* 漢堡選單按鈕：預設隱藏，僅在窄螢幕（見 RWD 區塊）顯示，
   點按後由 js/script.js 的 initMobileNav() 切換 .main-nav.is-open */
.nav-toggle {
  display: none;
}

/* 搜尋圖示 + 展開式輸入框
   點按 #search-toggle 後 body 加上 .search-open，
   輸入框由 width:0 展開為可輸入寬度（見 script.js） */
.search-wrap {
  display: flex;
  align-items: center;
}

.search-input {
  width: 0;
  opacity: 0;
  padding: 0;
  margin-left: 0;
  border: none;
  border-bottom: 1.5px solid var(--color-border);
  font-size: 14px;
  background: transparent;
  transition: width 0.25s ease, opacity 0.2s ease, padding 0.25s ease,
    margin 0.25s ease;
}

.search-wrap.is-open .search-input {
  width: 180px;
  opacity: 1;
  padding: 6px 4px;
  margin-left: 8px;
}

.search-input:focus {
  outline: none;
}

/* ==========================================================================
   2. Hero 區塊
   ========================================================================== */

.hero {
  position: relative;
  background: var(--color-bg-soft);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 260px;
  padding: 48px 0;
}

/* 先隱藏：01-homepage-hero.png 背景圖裡已經有 logo 跟「開開鳥嘴」標題了 */
.hero-logo-circle {
  display: none;
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  font-size: 18px;
}

.hero-text-box {
  border: 2px solid var(--color-blue);
  border-radius: var(--radius-sm);
  padding: 24px 40px;
  background: var(--color-white);
}

.hero-title {
  display: none;
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-slogan {
  margin: 8px 0 0;
  color: var(--color-text-light);
  font-size: 16px;
}

.hero-desc {
  margin: 4px 0 0;
  font-size: 16px;
}

/* ==========================================================================
   3. 簡介區塊
   ========================================================================== */

.intro {
  position: relative;
  padding: 56px 24px 72px;
}

.intro-text {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  color: var(--color-text-light);
}

.intro-text p {
  margin: 0 0 6px;
}

/* ==========================================================================
   4. 浮動插圖佔位符 (插圖 A / B / C 共用)

   結構：.illustration-slot（外層，負責該頁該區塊的固定版位／置中位移，
   純 CSS）> .illustration.floating-illustration（內層，實際的圓形視覺，
   持續的漂浮＋滾動視差動畫由 js/script.js 以 transform 逐幀驅動，
   不依賴滑鼠 hover）。兩層各自使用 transform，彼此不會互相覆蓋。
   ========================================================================== */

.illustration-slot {
  position: absolute;
  z-index: 5;
}

.illustration {
  width: 84px;
  height: 84px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  cursor: default;
}

/* 換成飛飛小插畫（透明背景）後不需要圓形卡片外框，讓插畫直接浮在頁面上 */
.illustration:has(img) {
  border: none;
  background: none;
}

.illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.floating-illustration {
  will-change: transform;
}

/* 首頁：插圖 A / B / C 版位 */
.intro .illustration-slot.illustration-a {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.recommend .illustration-slot.illustration-b {
  left: -18px;
  bottom: -18px;
}

.recommend .illustration-slot.illustration-c {
  right: 60px;
  bottom: -18px;
}

/* ==========================================================================
   5. 內容推薦區塊
   ========================================================================== */

.recommend {
  position: relative;
  padding: 24px 24px 120px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.recommend-card {
  display: flex;
  align-items: stretch;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.recommend-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.recommend-img {
  width: 420px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

.recommend-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  flex: 1;
}

.recommend-text h2 {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.recommend-text p {
  margin: 0;
  color: var(--color-text-light);
  font-size: 17px;
}

/* ==========================================================================
   6. 頁面通用元件：section 標題列 / 內文段落 / 照片佔位方塊
   ========================================================================== */

.page-hero {
  position: relative;
  background: var(--color-bg-soft);
  padding: 56px 0 40px;
  text-align: center;
}

.page-hero-title {
  margin: 0 0 16px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.page-hero-box {
  display: inline-block;
  border: 2px solid var(--color-blue);
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  background: var(--color-white);
}

.page-hero-box p {
  margin: 0;
  color: var(--color-text-light);
  font-size: 15px;
}

.section-label {
  display: inline-block;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 28px;
}

.content-section {
  padding: 48px 24px;
  position: relative;
}

.body-text {
  color: var(--color-text-light);
  font-size: 15px;
  line-height: 1.9;
}

.photo-block {
  background: var(--color-bg-card);
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 16px;
  color: var(--color-text-light);
  font-size: 14px;
  overflow: hidden;
}

.photo-block img {
  width: 100%;
  height: auto;
  display: block;
}

/* 有真實照片的 photo-block：不裁切（完整顯示，不切到照片上的文字）、
   不留圓角、不留佔位用的灰底框，容器高度跟著照片原始比例走 */
.photo-block:has(img) {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
}

.story-photo-wrap .photo-block:has(img) {
  height: auto;
  min-height: 0;
}

.two-photo-grid .photo-block:has(img) {
  aspect-ratio: auto;
}

/* ==========================================================================
   7. About Us（about.html）
   ========================================================================== */

.story-grid {
  display: flex;
  gap: 32px;
  align-items: stretch;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.story-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.story-photo-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}

.story-photo-wrap .photo-block {
  width: 100%;
  height: 100%;
  min-height: 260px;
}

.about-illustration-a {
  right: -20px;
  bottom: -20px;
}

.about-section-text {
  position: relative;
  margin-bottom: 24px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.about-illustration-b {
  left: -40px;
  top: 0;
}

.two-photo-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  position: relative;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* 單張全寬照片（例如奇異果特色區塊，捨棄左右兩欄排版） */
.full-photo {
  width: 100%;
}

/* min-width:0 是必要的：grid item 預設有 min-width:auto，
   搭配 aspect-ratio 會讓內容的內在寬度撐開超出欄位軌道寬度，
   導致直式照片（.photo-block--vertical）右側超出 .two-photo-grid
   容器範圍，在不同 section 間視覺上看起來「沒有對齊」。 */
.two-photo-grid .photo-block {
  width: 100%;
  min-width: 0;
}

.two-photo-grid .photo-block--square {
  aspect-ratio: 1 / 1;
}

.two-photo-grid .photo-block--vertical {
  aspect-ratio: 3 / 4;
  position: relative;
}

.about-illustration-c {
  right: -20px;
  bottom: -20px;
}

/* ==========================================================================
   8. News（news.html）
   ========================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 48px 24px;
}

.post-card {
  display: block;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.post-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.post-card-body {
  padding: 18px 20px 22px;
}

.post-card-date {
  font-size: 13px;
  color: var(--color-text-light);
}

.post-card-title {
  margin: 6px 0 8px;
  font-size: 18px;
}

.post-card-excerpt {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-light);
}

/* .article-view 外層跟站上其他 .container 區塊用同一個寬度/置中方式，
   確保文章頁跟首頁、商店頁的左邊界對齊在同一條線上。裡面的文字內容再用
   max-width 限制成適合閱讀的寬度，但「不」額外用 margin: auto 置中，
   而是靠左沿著外層容器的左邊排列——文章不管長短，起始位置都固定在同一
   個左邊界，短文章不會因為內容窄就看起來像浮在頁面正中央的一小塊。 */
.article-view {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-back-link,
.article-title,
.article-date,
.article-body {
  max-width: 720px;
}

.article-back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--color-blue);
  font-size: 14px;
}

.article-title {
  margin: 0 0 8px;
  font-size: 30px;
}

.article-date {
  color: var(--color-text-light);
  font-size: 14px;
  margin-bottom: 24px;
}

.article-body {
  color: var(--color-text-light);
  font-size: 15px;
  line-height: 1.9;
}

.article-body img {
  margin: 12px 0;
}

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   9. Shop（shop.html）— 目前僅單一預購商品
   ========================================================================== */

.preorder-section {
  position: relative;
  padding: 16px 24px 120px;
}

.preorder-heading-row {
  position: relative;
  margin-bottom: 24px;
}

.preorder-heading-row h2 {
  margin: 0;
  font-size: 26px;
}

.shop-illustration-a {
  right: -8px;
  top: -14px;
}

.shop-products-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.shop-products-grid .preorder-card:not(:first-child) {
  padding-top: 48px;
  border-top: 1px solid var(--color-border);
}

.preorder-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.preorder-card.is-sold-out .preorder-photo-wrap img {
  opacity: 0.5;
}

/* ==========================================================================
   商品圖片輪播（shop.html 商品卡片） + 商品名稱可點擊樣式
   ========================================================================== */
.product-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg-soft);
}

.product-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.carousel-arrow.carousel-prev {
  left: 8px;
}

.carousel-arrow.carousel-next {
  right: 8px;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--color-white);
}

.product-name-link {
  cursor: pointer;
}

.product-name-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   商品詳細資料浮窗
   ========================================================================== */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.product-modal {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

.product-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.preorder-photo-wrap {
  flex: 1;
  max-width: 320px;
  position: relative;
}

.preorder-photo-wrap .photo-block {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.shop-illustration-b {
  left: -20px;
  bottom: -20px;
}

.preorder-info {
  flex: 1;
  min-width: 0;
}

.preorder-package-info {
  color: var(--color-text-light);
  font-size: 13px;
  margin: 0 0 8px;
}

.preorder-desc {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 16px;
}

.preorder-price {
  font-size: 15px;
  color: var(--color-text-light);
  margin: 0 0 16px;
}

.preorder-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-add-cart {
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  background: var(--color-white);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-add-cart:hover {
  background: var(--color-text);
  color: var(--color-white);
}

.btn-add-cart:disabled {
  opacity: 0.6;
  cursor: default;
}

.shop-illustration-c {
  right: 60px;
  bottom: -40px;
}

/* ==========================================================================
   10. Cart（cart.html）
   ========================================================================== */

.cart-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 48px 24px;
}

.cart-items {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-empty {
  color: var(--color-text-light);
  padding: 40px 0;
  text-align: center;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 15px;
  margin: 0 0 4px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--color-text-light);
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-stepper button {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.cart-item-subtotal {
  width: 80px;
  text-align: right;
  font-weight: 700;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
}

.cart-summary {
  flex: 1;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--color-text-light);
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 800;
  margin: 16px 0 20px;
  border-top: 1px solid #d8d8d8;
  padding-top: 16px;
}

.btn-checkout {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  background: var(--color-blue);
  color: var(--color-white);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-checkout:hover {
  opacity: 0.9;
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ECPay Debug Sandbox Console */
.ecpay-panel {
  max-width: var(--max-width);
  margin: 0 auto 64px;
  padding: 0 24px;
}

.ecpay-panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-text);
  color: var(--color-white);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  cursor: pointer;
  font-family: monospace;
}

.ecpay-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
  flex-shrink: 0;
}

.ecpay-status-dot.is-idle {
  background: #888;
}

.ecpay-status-dot.is-sending {
  background: #e0a800;
  animation: pulse-dot 0.8s ease-in-out infinite;
}

.ecpay-status-dot.is-success {
  background: #2e7d32;
}

.ecpay-status-dot.is-error {
  background: #c62828;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.ecpay-panel-body {
  margin-top: 12px;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.ecpay-panel-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #a8e6a3;
}

.ecpay-panel-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow-y: auto;
}

/* ==========================================================================
   11. Contact（contact.html）
   ========================================================================== */

/* 無外框的頁面標語（shop.html / contact.html 用，about.html 保留 .page-hero-box） */
.page-hero-plain {
  margin: 4px 0;
  color: var(--color-text-light);
  font-size: 15px;
}

.contact-info-section {
  padding: 48px 24px 0;
}

.contact-info-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  padding: 28px;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-info-list li {
  display: flex;
  gap: 12px;
  font-size: 15px;
}

.contact-info-list .info-label {
  color: var(--color-text-light);
  width: 90px;
  flex-shrink: 0;
}

.contact-form-section {
  padding: 32px 24px 0;
}

.contact-form-card {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  padding: 28px;
}

.contact-intro {
  color: var(--color-text-light);
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 14px;
  color: var(--color-text-light);
}

.form-field input,
.form-field textarea {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: var(--color-white);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 1px;
}

.btn-submit {
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  background: var(--color-text);
  color: var(--color-white);
  cursor: pointer;
}

.form-response {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: none;
}

.form-response.is-success {
  display: block;
  background: #e6f4ea;
  color: #2e7d32;
}

.form-response.is-error {
  display: block;
  background: #fdecea;
  color: #c62828;
}

.contact-illustration-a {
  right: -20px;
  bottom: -20px;
}

/* 常見問題（FAQ） */
.faq-section {
  position: relative;
  padding: 48px 24px 96px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.faq-item p {
  margin: 0 0 4px;
}

.faq-q {
  font-weight: 700;
}

.faq-a {
  color: var(--color-text-light);
}

.contact-illustration-b {
  left: 0;
  bottom: 0;
}

.contact-illustration-c {
  right: 100px;
  top: 40%;
}

/* ==========================================================================
   12. Member Center（member.html）
   ========================================================================== */

.member-section {
  max-width: 480px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.member-card {
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  padding: 32px;
}

.member-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.member-tab {
  flex: 1;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  border-radius: 999px;
  padding: 8px;
  font-size: 14px;
  cursor: pointer;
}

.member-tab.is-active {
  background: var(--color-text);
  color: var(--color-white);
}

.member-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.member-form.is-hidden {
  display: none;
}

.member-profile-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.member-profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 32px;
}

.member-profile-section .profile-edit-card {
  margin-bottom: 32px;
}

.member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-white);
}

.member-logout {
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.orders-table th,
.orders-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #e2e2e2;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.paid {
  background: #e6f4ea;
  color: #2e7d32;
}

.status-badge.pending {
  background: #fff4e0;
  color: #b26a00;
}

.status-badge.cancelled {
  background: #fde8e8;
  color: #b3261e;
}

.bank-info-box {
  background: var(--color-bg-soft);
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0 24px;
  font-size: 14px;
  line-height: 1.8;
}

/* ==========================================================================
   13. Search（search.html）
   搜尋結果卡片清單 + 空狀態（無關鍵字／查無結果），
   視覺語言比照 .post-card / .faq-item：bg-card 圓角卡片。
   ========================================================================== */

.search-results-section {
  padding: 48px 24px 96px;
}

.search-count {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--color-text-light);
}

.search-result-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.search-result-card {
  display: block;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.search-result-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.search-result-type {
  display: inline-block;
  background: var(--color-white);
  border: 1.5px solid var(--color-blue);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-blue);
}

.search-result-date {
  font-size: 13px;
  color: var(--color-text-light);
}

.search-result-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.search-result-snippet {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-light);
}

.search-empty {
  max-width: 720px;
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 40px 24px;
  text-align: center;
}

.search-empty-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.search-empty-hint {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-light);
}

.search-empty-hint a {
  color: var(--color-blue);
  text-decoration: underline;
}

/* ==========================================================================
   14. Footer
   兩段式：左側標語跑馬燈（無限捲動）+ 右側「聯絡我們」與社群圖示
   ========================================================================== */

.site-footer {
  margin-top: auto;
  display: flex;
  border-top: 1px solid #ddd;
}

.footer-ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: var(--color-bg-soft);
}

.footer-ticker-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  padding: 16px 24px;
  font-size: 14px;
  color: var(--color-text-light);
  animation: footer-ticker-scroll 22s linear infinite;
}

/* 每個項目自帶右側間距（而非用 flex gap），確保 -50% 位移剛好等於
   一份項目的完整寬度，捲動才會無縫銜接，不會在動畫重頭時跳動。 */
.footer-ticker-track span {
  margin-right: 40px;
}

@keyframes footer-ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.footer-social {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: var(--color-white);
  border-left: 1px solid #e2e2e2;
}

.footer-social a {
  font-size: 14px;
  white-space: nowrap;
}

.footer-social .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .footer-ticker-track {
    animation: none;
  }
}

/* ==========================================================================
   15. RWD：小螢幕調整
   ========================================================================== */

/* 導覽列在窄螢幕下收合為漢堡選單（.nav-toggle 由 js/script.js 的
   initMobileNav() 控制 .main-nav.is-open 的開關） */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid #e2e2e2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    z-index: 99;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
  }

  .main-nav a {
    display: block;
    padding: 13px 0;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
  }

  .main-nav li:last-child a {
    border-bottom: none;
  }
}

@media (max-width: 720px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-text-box {
    padding: 20px 24px;
  }

  .recommend-card {
    flex-direction: column;
  }

  .recommend-img {
    width: 100%;
    height: auto;
  }

  .intro .illustration-slot.illustration-a {
    position: static;
    transform: none;
    margin: 20px auto 0;
  }

  .story-grid {
    flex-direction: column;
  }

  .about-illustration-a,
  .about-illustration-c {
    right: 8px;
    bottom: -16px;
  }

  .about-illustration-b {
    position: static;
    margin-bottom: 12px;
  }

  .two-photo-grid {
    grid-template-columns: 1fr;
  }

  .cart-layout {
    flex-direction: column;
  }

  .cart-summary {
    width: 100%;
    position: static;
  }

  .member-profile-card {
    flex-wrap: wrap;
  }

  .orders-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .preorder-card {
    flex-direction: column;
  }

  .preorder-photo-wrap {
    max-width: 100%;
  }

  .shop-illustration-a {
    position: static;
    margin: 0 0 12px;
  }

  .shop-illustration-b {
    position: static;
    margin: 16px auto 0;
  }

  .shop-illustration-c {
    display: none;
  }

  .contact-form-card {
    padding: 20px;
  }

  .contact-illustration-a {
    position: static;
    margin: 16px auto 0;
  }

  .contact-illustration-b {
    position: static;
    margin: 24px auto 0;
  }

  .contact-illustration-c {
    display: none;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-social {
    border-left: none;
    border-top: 1px solid #e2e2e2;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .header-actions {
    gap: 8px;
  }

  .btn-login {
    padding: 6px 12px;
    font-size: 13px;
  }

  .search-wrap.is-open .search-input {
    width: 110px;
  }

  .page-hero-title {
    font-size: 30px;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .search-results-section {
    padding: 40px 16px 72px;
  }

  .search-result-card {
    padding: 18px 18px;
  }

  .search-result-meta {
    flex-wrap: wrap;
    row-gap: 4px;
  }
}
