@import url('https://fonts.googleapis.com/css2?family=Qwitcher+Grypen:wght@400;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Patrick+Hand&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

/* ===========================
   Minimal Basque Dream CSS
   =========================== */
:root {
  --main-bg: #FFF8F0;
  --primary-color: #7E8D61;
  --accent-color: #C1A57B;
  --text-color: #333;
  --subtext-color: #666;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* 關鍵：強制 Safari 與 Chrome 呈現相同的字體質感 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* 改 all 字體 */
body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--main-bg);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100px;
  overflow-x: hidden; /* 防止水平滾動 */
  width: 100%;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

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

/* Header - 頂級穩定化佈局 (精緻俐落高度與等比縮小) */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(24px, 2.2vw, 36px);
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Patrick Hand', cursive;
}

header.scrolled {
  height: 58px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

header.scrolled .logo img.logo-icon-img,
header.scrolled .logo > a > img:first-child {
  height: 48px;
}

header.scrolled .logo img.logo-text-img {
  height: 25px;
}

header.scrolled .logo,
header.scrolled .logo a,
header.scrolled .logo span,
header.scrolled .logo a span {
  font-size: 28px !important;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo,
.logo a,
.logo span,
.logo a span {
  font-family: 'Qwitcher Grypen', cursive !important;
  font-size: 32px !important;
  font-weight: 400 !important;
  color: #000000 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: font-size 0.3s ease;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo img.logo-icon-img,
.logo > a > img:first-child {
  height: 56px;
  padding: 0;
  transition: height 0.3s ease;
}

.logo img.logo-text-img {
  height: 30px;
  width: auto;
  padding: 0;
  object-fit: contain;
  margin-left: -2px;
  display: inline-block;
  vertical-align: middle;
  transition: height 0.3s ease;
}

.logo img {
  height: 56px;
  padding: 0;
  transition: height 0.3s ease;
}

/* Search Box Styles */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  width: 135px;
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 5px 15px rgba(193, 165, 123, 0.15);
  width: 220px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  padding: 3px 8px;
  width: 100%;
  font-size: 13px;
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: normal;
}

.search-box i {
  color: #888;
  font-size: 16px;
}

/* Search Results Dropdown ... (unchanged) */
.search-results {
  position: absolute;
  top: 110%;
  right: 0;
  width: 300px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: none;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #eee;
}

.search-results.show {
  display: block;
}

.search-item {
  padding: 12px 20px;
  border-bottom: 1px solid #f9f9f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: #fdfaf5;
}

.search-item .item-name {
  font-size: 14px;
  color: #333;
}

.search-item .item-cat {
  font-size: 11px;
  background: #eee;
  padding: 2px 8px;
  border-radius: 10px;
  color: #888;
}

#search-btn {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* 全域購物車按鈕樣式 (電腦版比照手機版：簡約透明無框、懸停綠色) */
.premium-cart-btn {
  background: transparent !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  margin-left: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

.premium-cart-btn:hover {
  background: transparent !important;
  transform: none !important;
}

.premium-cart-btn:hover i {
  color: #7E8D61 !important;
}

.premium-cart-btn i {
  font-size: 20px !important;
  color: #444 !important;
  line-height: 1 !important;
  transition: color 0.2s ease !important;
  display: block !important;
  -webkit-font-smoothing: antialiased !important;
}

.premium-cart-btn .cart-badge {
  top: -5px !important;
  right: -7px !important;
  min-width: 14px !important;
  height: 14px !important;
  font-size: 8.5px !important;
  padding: 0 3px !important;
}

/* 購物車側邊抽屜「前往結帳」按鈕微調 */
.checkout-btn {
  padding: 12px 18px !important;
  border-radius: 24px !important;
  font-size: 14.5px !important;
  box-shadow: 0 3px 10px rgba(126, 141, 97, 0.24) !important;
  letter-spacing: 0.5px !important;
}

.sidebar-footer {
  padding: 20px !important;
}

nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-weight: normal;
}

nav a {
  position: relative;
  padding: 6px 0;
  margin: 0 8px;
  font-size: 14px;
  font-weight: normal;
  color: #000000; /* 改為純黑色 */
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

nav a:hover {
  color: var(--primary-color);
}

.dropdown {
  position: relative;
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 12px); /* 初始下偏，用於向上漸現 */
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(74, 46, 26, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  min-width: 135px; /* 精簡寬度適配純中文 */
  z-index: 1000;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 隱形橋樑，防止滑鼠滑向選單時中途消失 */
.dropdown__menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 12px;
  background: transparent;
}

.dropdown__menu a {
  display: block;
  padding: 8px 16px;
  font-weight: normal;
  font-size: 13px;
  color: #000000; /* 改為純黑色 */
  white-space: nowrap;
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.4;
  margin: 0;
}

.dropdown__menu a:hover {
  background: rgba(126, 141, 97, 0.09); /* 品牌暖綠色的微透背景 */
  color: #7E8D61; /* 品牌綠色 */
  padding-left: 20px; /* 向右微平移 */
}

.dropdown:hover .dropdown__menu,
.dropdown__menu.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0); /* 歸位 */
}

/* Hero */
.hero  {
  max-width: 1300px;
  margin: 0 auto 100px;
  width: 95%;
}


.hero .btn {
  background: var(--accent-color);
  color: #fff;
  padding: 12px 30px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.hero .btn:hover {
  background: #a38260;
}

/* Main Content */
main {
  flex: 1;
  padding: 0; /* 移除全域內距，讓滿版區塊真正滿版 */
  text-align: center;
  width: 100%;
}

section {
  margin-bottom: 60px;
  width: 100%;
}

/* 針對需要留白的 Section 另外設定 */
.contact-section {
  padding: 40px 5%;
}

.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 5vw, 100px);
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-image img {
  max-width: 550px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.contact-info {
  font-size: 16px;
  color: var(--text-color);
  line-height: 1.8;
  max-width: 450px;
  text-align: left;
}

.contact-info p {
  margin-bottom: 20px;
  display: flex;
 text-align: left;
}

.contact-info strong {
  width: 80px;
  flex-shrink: 0;
}

.contact-info span {
  flex-grow: 1;
}

h2 {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 20px;
  color: var(--text-color);
}

/* ===========================
   Premium Title Redesign 
   =========================== */
.section-title-box {
  text-align: center;
  margin: 60px 0 0px;
}

.premium-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; 
  color: #4A2E1A;
  margin-bottom: 12px;
  letter-spacing: 3px;
  font-weight: 700;
}

.title-underline {
  width: 50px;
  height: 3px;
  background: #C1A57B;
  margin: 0 auto 5px;
}

.premium-subtitle {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: #888;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* 讓 h6 標題也套用新風格（如果 html 使用 h6） */
.knowledge-title-box {
  margin: 10px 0 0px;
}

/* 價格與訂購按鈕區塊 */
.price-action-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 25px 0;
}

.price-label {
  font-size: 15px;
  font-weight: bold;
  color: #666;
  font-family: 'Noto Sans TC', sans-serif;
}

.order-inline-btn {
  background-color: #7E8D61;
  color: #ffffff !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.order-inline-btn:hover {
  background-color: #C1A57B;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(193, 165, 123, 0.3);
}

p {
  font-size: 14px;
  color: var(--subtext-color);
  max-width: 700px;
  margin: 0 auto 30px;
}

.photo-placeholder img {
  width: 100%;
  max-width: 850px;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--shadow);
  margin: 0 auto;
}

/* Footer */
footer {
  background-color: #503e26 !important; /* 精選深焦糖栗子木棕色 */
  border-top: 1px solid #6b5334 !important;
  padding: 45px 20px 30px;
  font-size: 14px;
  color: #EADDCF !important;
  text-align: center;
  box-shadow: 0 -4px 20px rgba(80, 62, 38, 0.12) !important;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto 30px;
  text-align: left;
}

.footer-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #FFFFFF !important; /* 純白大標題，清晰俐落 */
  margin-bottom: 16px;
  position: relative;
  letter-spacing: 1px;
}

.footer-section h3::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: #E8BF85 !important; /* 暖琥珀金下劃線 */
  margin-top: 6px;
}

.footer-section p, .footer-section ul {
  color: #EADDCF !important; /* 溫潤燕麥奶白文字 */
  line-height: 1.7;
  font-size: 14px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  text-decoration: none;
  color: #EADDCF !important;
  transition: all 0.3s;
}

.footer-section ul li a:hover {
  color: #FFFFFF !important; /* 懸停純白 */
  text-shadow: 0 0 6px rgba(255,255,255,0.3);
}

.footer-section i {
  margin-right: 10px;
  color: #E8BF85 !important; /* 琥珀金圖示 */
}

.footer-social a {
  color: #EADDCF !important;
  margin-right: 15px;
  font-size: 24px;
  transition: all 0.3s;
  display: inline-block;
}

.footer-social a:hover {
  color: #FFFFFF !important;
  transform: translateY(-3px);
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  margin: 0 auto 20px;
  max-width: 1100px;
}

.footer-bottom-links {
  margin-bottom: 15px;
}

.footer-bottom-links a {
  color: #CBB9A7 !important;
  text-decoration: none;
  margin: 0 15px;
  font-size: 13px;
  transition: all 0.3s;
}

.footer-bottom-links a:hover {
  color: #FFFFFF !important;
}

.footer-detail p {
  font-size: 12px;
  color: #B5A18E !important;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .footer-section h3::after {
    margin: 8px auto 0;
  }
  
  .footer-social {
    text-align: center !important;
  }
  
  .footer-social a {
    margin: 0 10px;
  }
}

/* 🔽 輪播樣式 Carousel 🔽 */
.carousel {
  position: relative;
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-track img {
  width: 100%;
  height: auto;
  flex-shrink: 0;
  border-radius: 10px;
}

/* 左右按鈕 */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(224, 224, 224, 0.8);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.carousel-btn:hover {
  background: #ccc;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn {
  font-size: 16px;
  color: #121212;
}

/* 🔼 Carousel Dots 🔼 */
.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-dots .dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  width: clamp(20px, 5vw, 30px);
  border-radius: 10px;
  background: #fff;
}

/* --- 頁面淡入效果 --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Apple Slider (Restored to Landscape 16:9) */
.apple-slider {
  position: relative;
  width: 100%; /* 改為 100%，避免使用 100vw 造成的鬆動感 */
  overflow: hidden; 
  padding: 10px 0 0px; /* 移除底部內距 */
  cursor: grab;
}

.apple-slider:active {
  cursor: grabbing;
}

.apple-slider-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform; /* 優化效能，解決殘影 */
}

.apple-slider-track img {
  width: 60vw; /* 恢復原本的大圖寬度 */
  max-width: 1000px;
  aspect-ratio: 16 / 9 !important; /* 恢復原本的橫向大氣比例 */
  height: auto !important;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 32px;
  margin: 0 10px;
  user-select: none;
  pointer-events: none;
}

/* 中央控制列 (按鈕與點點並列) */
.apple-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 10px; /* 大幅縮小底部間距 */
}

/* 電腦版：按鈕浮動在兩側 */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  color: #333;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev { left: 40px; }
.slider-btn.next { right: 40px; }

/* 底部進度點點 */
.apple-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.dot {
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
}

.dot.active {
  width: 35px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.dot .progress {
  position: absolute;
  top: 0; left: 0;
  height: 100%; width: 0;
  background: var(--primary-color);
  transition: none !important; /* 關鍵：關閉 CSS 動畫，讓 JS 線性控制達到極致絲滑 */
}

@media (max-width: 768px) {

  
  /* 手機版：按鈕集中在點點兩側 */
  .apple-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
  }

  .slider-btn {
    position: static; 
    transform: none;
    width: 30px;
    height: 30px;
    background: none;
    backdrop-filter: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
  }

  .slider-btn:hover {
    transform: scale(1.1);
    background: none;
  }

  .apple-slider-dots {
    margin-top: 0;
  }
}

/* ===========================
   Latest News Section (Minimalist Coffee Shop Style)
   =========================== */
.news-section {
  background-color: #FFF8F0; /* 統一採用品牌暖奶油杏色 #FFF8F0 */
  padding: 40px 30px 20px 30px;
  margin-bottom: 0;
}

.news-container {
  max-width: 1150px;
  margin: 0 auto;
}

.news-section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 32px);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #4A2E1A; /* 醒厚和暖咖啡棕色標題 */
  margin-bottom: 40px;
  font-weight: 700;
  text-align: center;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card-image {
  width: 100%;
  border-radius: 0; /* 移除圓弧 */
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.news-card-image img {
  width: 100%;
  aspect-ratio: 3 / 2; /* 對齊咖啡系列飲品的橫向比例 */
  height: auto;
  object-fit: cover;
  border-radius: 0; /* 覆蓋全域 img 的 8px 圓角 */
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: #D32F2F;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.news-card-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 5px;
}

.news-card-date {
  font-size: 13px;
  color: #888;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
}

.news-card-title {
  font-size: clamp(18px, 2vw, 22px);
  color: #333;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
  color: #8B5A2B;
}

.news-card-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 手機與平板排版調整 (置中單張大卡片 + 箭頭導航) */
.news-carousel-wrapper {
  position: relative;
  width: 100%;
}

.news-nav-btn {
  display: none; /* 電腦版維持 3 欄並排，不需要箭頭 */
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(74, 46, 26, 0.12);
  border-radius: 50%;
  color: #4A2E1A;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: none;
  align-items: center;
  justify-content: center;
}

.news-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
  background: #fff;
}

.news-nav-btn.prev { left: 8px; }
.news-nav-btn.next { right: 8px; }

@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .news-section {
    padding: 35px 0 25px 0;
    overflow: hidden;
  }

  .news-container {
    padding: 0;
    max-width: 100%;
  }

  .news-section-title {
    text-align: center;
    padding: 0 20px;
    margin-bottom: 24px;
  }

  .news-nav-btn {
    display: none !important; /* 隱藏箭頭，純粹靠手勢滑動 */
  }

  .news-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 0 calc((100vw - 80vw) / 2) 15px; /* 精確讓 80vw 大卡片完美居中，兩側露出恰到好處的邊緣 */
    margin: 0;
    scrollbar-width: none;
  }

  .news-grid::-webkit-scrollbar {
    display: none;
  }

  .news-card {
    flex: 0 0 80vw; /* 稍微放大一點點 (由 76vw 微調至 80vw) */
    max-width: 360px;
    scroll-snap-align: center; /* 每次滑動精確自動吸附置中 */
    scroll-snap-stop: always;
    background: #fff;
    border-radius: 0;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(74, 46, 26, 0.06);
  }

  .news-card-image {
    margin-bottom: 12px;
    border-radius: 0;
    overflow: hidden;
  }

  .news-card-image img {
    width: 100%;
    aspect-ratio: 16 / 10; /* 大氣寬比例，照片更大更清楚 */
    object-fit: cover;
    border-radius: 0;
  }

  .news-card-content {
    padding: 4px 6px 6px;
    text-align: left;
  }

  .news-card-title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .news-card-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.5;
  }
}

/* ==========================================================================
   Latest News Modal (最新消息介紹浮窗)
   ========================================================================== */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(44, 34, 30, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
  box-sizing: border-box;
}

.news-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.news-modal-card {
  background: #FFFFFF;
  border-radius: 0;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(44, 34, 30, 0.28), 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(230, 220, 208, 0.7);
  transform: scale(0.92) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 18px 18px 20px 18px;
}

.news-modal-overlay.active .news-modal-card {
  transform: scale(1) translateY(0);
}

.news-modal-close {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #4A2E1A;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.news-modal-close:hover {
  background: #4A2E1A;
  color: #FFFFFF;
  transform: scale(1.06);
}

.news-modal-close:active {
  transform: scale(0.94);
}

.news-modal-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: #FAF8F5;
  flex-shrink: 0;
  border-radius: 0;
}

.news-modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.news-modal-badge {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background-color: #D32F2F;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.35);
}

.news-modal-body {
  padding: 16px 4px 0 4px;
  overflow-y: auto;
  flex-grow: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.news-modal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.news-modal-date {
  font-size: 13px;
  color: #888;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
}

.news-modal-cat {
  font-size: 12px;
  color: #7E8D61;
  background: rgba(126, 141, 97, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.news-modal-title {
  font-size: 21px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 10px;
  line-height: 1.35;
  font-family: 'Noto Sans TC', sans-serif;
}

.news-modal-desc {
  font-size: 14px;
  color: #555555;
  line-height: 1.75;
  margin: 0 0 16px;
  font-family: 'Noto Sans TC', sans-serif;
  white-space: pre-line;
}

.news-modal-footer {
  border-top: 1px solid rgba(193, 165, 123, 0.25);
  padding-top: 14px;
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.news-modal-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  padding: 6px 10px;
  border-radius: 0;
  background: transparent;
  border: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.news-modal-nav-item:hover {
  background: rgba(193, 165, 123, 0.12);
  transform: translateX(3px);
}

.news-modal-nav-item .nav-zh {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #4A2E1A;
  transition: color 0.3s ease;
  line-height: 1.4;
}

.news-modal-nav-item .nav-arrow {
  font-size: 16px;
  color: #C1A57B;
  transition: transform 0.3s ease, color 0.3s ease;
}

.news-modal-nav-item:hover .nav-zh {
  color: #2B180D;
}

.news-modal-nav-item:hover .nav-arrow {
  color: #4A2E1A;
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .news-modal-overlay {
    padding: 16px;
  }
  .news-modal-card {
    border-radius: 0;
    max-height: 86vh;
    padding: 14px 14px 16px 14px;
  }
  .news-modal-image-wrap {
    border-radius: 0;
  }
  .news-modal-image-wrap img {
    border-radius: 0;
  }
  .news-modal-close {
    top: 22px;
    right: 22px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .news-modal-body {
    padding: 14px 2px 0 2px;
  }
  .news-modal-title {
    font-size: 18px;
  }
  .news-modal-desc {
    font-size: 13.5px;
    line-height: 1.65;
    margin-bottom: 14px;
  }
  .news-modal-footer {
    padding-top: 12px;
  }
  .news-modal-nav-item {
    padding: 6px 8px;
    gap: 6px;
  }
  .news-modal-nav-item .nav-zh {
    font-size: 0.9rem;
  }
}

/* ===========================
   Coffee Knowledge Section Styles (CASETiFY Style)
   =========================== */
.knowledge-section {
  background-color: #FFF8F0; /* 統一採用品牌暖奶油杏色 #FFF8F0 */
  padding: 0 30px clamp(40px, 6vw, 70px) 30px; /* 上方 padding 改為 0，與上方 Shopping Guide 距離更近更緊湊 */
  color: #3D2410;
  overflow: hidden;
  margin-bottom: 0;
}

.knowledge-header {
  max-width: 1150px;
  margin: 0 auto clamp(20px, 3vw, 35px) auto;
  text-align: center; /* 標題完全置中 */
}

.knowledge-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 32px); /* 與 news-section-title 一致 */
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #4A2E1A; /* 醒厚和暖咖啡棕色標題，與 news-section-title 一致 */
  margin-bottom: 8px;
  font-weight: 700;
  text-align: center;
}

.knowledge-subtitle {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px; /* 與最新消息內文字體層次一致 */
  color: #666;
  letter-spacing: 1px;
  margin: 0 auto;
  text-align: center !important;
  display: block;
}

.knowledge-grid {
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* 電腦版 3 張卡片 100% 完美置中對齊 */
  gap: clamp(16px, 2.5vw, 24px);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 0 20px 0; 
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.knowledge-grid::-webkit-scrollbar {
  display: none;
}

.knowledge-card {
  flex: 0 0 clamp(192px, 60vw, 304px); /* 照片等比例縮小20%，高度跟著變動 */
  display: flex;
  flex-direction: column;
  background: transparent;
  cursor: pointer;
}



.knowledge-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

.knowledge-image img {
  width: 100%;
  aspect-ratio: 4 / 5; /* 統一手機和電腦版的照片長寬比 */
  height: auto;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.knowledge-card:hover .knowledge-image img {
  transform: scale(1.05);
}

.knowledge-content {
  padding: 0 15px; /* 內文也保持一致的 15px 邊距 */
}

.knowledge-content h3 {
  font-size: clamp(18px, 2vw, 22px);
  color: #3D2410; /* 深咖啡棕色卡片標題 */
  margin-bottom: 8px;
  font-weight: 600;
}

.knowledge-content p {
  font-size: 14px;
  color: #7A5C44; /* 柔和暖棕色描述文字 */
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 電腦版取消左右控制按鈕 */

@media (min-width: 1024px) {
  .knowledge-section {
    padding: clamp(40px, 8vw, 80px) 32px;
  }
  
  .knowledge-header {
    padding: 0;
  }
  
  /* 電腦版取消滑動，直接使用 CSS Grid 均分三等份 */
  .knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding: 0;
    overflow: visible;
  }
  
  /* 讓卡片在電腦版自動填滿 grid 的一格，取消手機版的 flex 寬度設定 */
  .knowledge-card {
    flex: none;
    width: 100%;
    max-width: none;
  }


}

/* ===========================
   Product Detail Pages 
   =========================== */
.product-detail-layout {
  display: flex;
  gap: clamp(32px, 4vw, 60px);
  max-width: 1150px;
  width: 100%;
  margin: 35px auto;
  padding: 0 clamp(24px, 3.5vw, 40px);
  box-sizing: border-box;
  text-align: left;
  align-items: flex-start;
}

.product-image-column {
  flex: 0.9; /* 縮小照片比例 */
  position: relative;
}

.main-product-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.thumbnail-row {
  display: flex;
  gap: 15px;
}

.thumbnail {
  width: 80px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
  border: 2px solid transparent;
}

.thumbnail:hover, .thumbnail.active {
  opacity: 1;
  border-color: var(--primary-color);
}

.product-description {
  flex: 1;
  padding-top: 10px;
}

@media (max-width: 992px) {
  .product-detail-layout {
    flex-direction: column;
    padding: 0 20px;
    gap: 40px;
  }
  
  .product-image-column {
    position: static;
    width: 100%;
  }

  .product-description {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .main-product-image {
    border-radius: 12px;
  }
  .thumbnail {
    width: 60px;
  }
}

/* ===========================
   相關商品推薦區塊 (Related Products)
   =========================== */
@media (min-width: 993px) {
  .related-products-box.desktop-only {
    display: block;
    margin-top: 18px; /* 緊貼上方小照片縮圖，字眼靠上 */
  }
  .related-products-box.desktop-only .related-box-title {
    margin-bottom: 12px;
  }
  .related-products-box.desktop-only .related-products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .related-products-box.desktop-only .related-product-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .related-products-box.desktop-only .related-card-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* 正方形照片框框 */
    position: relative;
    overflow: hidden;
    background: #f7f7f7;
  }
  .related-products-box.desktop-only .related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
  }
  .related-products-box.desktop-only .related-card-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
  }
  .related-products-box.mobile-only {
    display: none !important;
  }
}

@media (max-width: 992px) {
  .related-products-box.desktop-only {
    display: none !important;
  }
  .related-products-box.mobile-only {
    display: block;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #eee;
  }
  .related-products-box.mobile-only .related-card-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* 正方形照片框框 */
    position: relative;
    overflow: hidden;
    background: #f7f7f7;
  }
  .related-products-box.mobile-only .related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
  }
}

.related-box-title {
  font-size: 15px;
  font-weight: 700;
  color: #4A2E1A;
  margin-bottom: 12px;
  letter-spacing: 0.8px;
}

.related-products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.related-product-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.related-product-card:hover {
  transform: translateY(-4px);
  border-color: #C1A57B;
  box-shadow: 0 8px 20px rgba(74, 46, 26, 0.1);
}

.related-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* 正方形照片框框 */
  overflow: hidden;
  background: #f7f7f7;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.related-product-card:hover .related-card-img img {
  transform: scale(1.06);
}

.related-card-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #7E8D61;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  z-index: 2;
}

.related-card-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  background: #fff;
}

.related-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #4A2E1A;
  margin: 0 0 6px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.related-product-card:hover .related-card-title {
  color: #7E8D61;
}

.related-card-price {
  font-size: 13.5px;
  font-weight: bold;
  color: #7E8D61;
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
}
.floating-order-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #7E8D61;
  color: #ffffff !important;
  padding: 14px 24px;
  border-radius: 50px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(126, 141, 97, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999;
  font-weight: bold;
  font-size: 15px;
}

.floating-order-btn:hover {
  transform: translateY(-5px) scale(1.05);
  background-color: #C1A57B;
  box-shadow: 0 15px 35px rgba(193, 165, 123, 0.5);
}

/* -------------------------------------------
   漢堡選單與行動版響應式設計 (1024px 以下)
   ------------------------------------------- */

/* 漢堡按鈕 (預設隱藏) */
#mobile-menu-btn {
  display: none;
  font-size: 22px;
  cursor: pointer;
  color: #333;
  z-index: 10;
}

/* 行動版側邊欄遮罩 */
#mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#mobile-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 全螢幕側邊欄本體 (固定頂部、舒適間距) */
#mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 10002;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: 18px 24px 36px 24px;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
}

#mobile-sidebar.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sidebar-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 20px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #f2eee8 !important;
  flex: 0 0 auto !important;
}

.sidebar-header .logo-text,
.logo-text {
  font-family: 'Qwitcher Grypen', cursive !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #2C221E !important;
  white-space: nowrap !important;
  letter-spacing: 1px;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar-close {
  font-size: 24px !important;
  cursor: pointer !important;
  color: #444 !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
}

.sidebar-close:hover {
  color: #C1A57B !important;
  transform: rotate(90deg);
}

.sidebar-nav {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  flex: 0 0 auto !important;
}

/* 側邊欄主導覽項目靠左排版 (舒適間距與字體大小) */
.sidebar-nav > a,
.sidebar-dropdown-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 0 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  border-bottom: 1px solid #f4f0e8 !important;
  width: 100% !important;
  max-width: none !important;
  color: #2C221E !important;
  cursor: pointer !important;
  text-align: left !important;
  text-decoration: none !important;
  margin: 0 !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  letter-spacing: 0.5px !important;
  transition: color 0.2s ease, padding-left 0.2s ease !important;
}

.sidebar-nav > a:hover,
.sidebar-dropdown-btn:hover {
  color: #7E8D61 !important;
}

.sidebar-dropdown-btn span {
  flex: 1;
  text-align: left;
}

#dropdown-arrow {
  font-size: 18px;
  color: #999;
  transition: transform 0.3s ease, color 0.2s ease;
}

.sidebar-dropdown-btn:hover #dropdown-arrow {
  color: #7E8D61;
}

/* 側邊欄下拉選單樣式 */
.sidebar-dropdown {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.sidebar-sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fbf9f6;
  border-left: 2.5px solid #C1A57B;
  border-radius: 0 8px 8px 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
}

.sidebar-sub-menu.active {
  max-height: 400px !important;
  padding: 12px 0 12px 20px !important;
  margin: 10px 0 16px !important;
  opacity: 1 !important;
}

/* 側邊欄子選單項目 */
#mobile-sidebar .sidebar-sub-menu a {
  display: block !important;
  width: 100% !important;
  font-size: 15.5px !important;
  font-weight: 400 !important;
  padding: 10px 0 !important;
  border-bottom: none !important;
  color: #555 !important;
  text-align: left !important;
  margin: 0 !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
}

#mobile-sidebar .sidebar-sub-menu a:hover {
  color: #7E8D61 !important;
  transform: translateX(4px);
}

/* 側邊欄底部社群 (靠最底端) */
.sidebar-footer-info {
  margin-top: auto !important;
  padding-top: 24px;
  padding-bottom: 6px;
  border-top: 1px solid #f2eee8;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 auto !important;
}

.sidebar-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f7f4ef;
  color: #4A2E1A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-socials a:hover {
  background: #7E8D61;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Apple 風格全螢幕搜尋層 */
#fullscreen-search {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  z-index: 10005;
  display: none;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
  animation: fadeIn 0.3s ease;
}

.search-input-wrapper {
  width: 600px;
  max-width: 85%;
  position: relative;
}

#fs-search-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid #eee;
  padding: 15px 0;
  font-size: 32px;
  font-weight: 500;
  background: transparent;
  outline: none;
  font-family: 'Noto Sans TC', sans-serif;
}

#search-close-btn {
  position: absolute;
  top: 40px;
  right: 5%;
  font-size: 36px;
  cursor: pointer;
  color: #999;
}

.fullscreen-results {
  width: 600px;
  max-width: 85%;
  margin-top: 40px;
  max-height: 60vh;
  overflow-y: auto;
}

.fs-result-item {
  padding: 20px;
  background: #fff;
  border-radius: 15px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border: 1px solid #f0f0f0;
  transition: all 0.2s;
}

.fs-result-item:hover {
  border-color: #C1A57B;
}

.fs-result-item .item-name {
  font-size: 16px;
  color: #333;
}

.fs-result-item .item-cat {
  color: #C1A57B;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 15px;
}

/* 強制響應式佈局鎖定 */
@media (max-width: 1024px) {
  header nav {
    display: none !important;
  }

  header {
    height: 60px !important;
    padding: 0 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: sticky !important;
    top: 0 !important;
  }

  /* Logo 移至左側 */
  .logo {
    position: static !important;
    transform: none !important;
    order: 1 !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .logo a span,
  .logo img.logo-text-img {
    display: none !important; /* 手機版隱藏 Dream House Coffee 文字 */
  }

  .logo img.logo-icon-img,
  .logo > a > img:first-child,
  .logo img {
    height: 48px !important;
    padding: 0 !important;
  }

  /* 右側功能區 (搜尋、購物車) */
  .header-right {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 27px !important;
    order: 2 !important;
    padding-right: 27px !important; /* 與漢堡按鈕保持均勻 27px 間距 */
  }

  /* 漢堡按鈕移至最右側 (與搜尋、購物車同色且等比細緻) */
  #mobile-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    order: 3 !important;
    margin-right: 0 !important;
    font-size: 20px !important;
    color: #444 !important;
    cursor: pointer !important;
    height: 100% !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
    -webkit-font-smoothing: antialiased !important;
  }
  
  .search-box {
    display: none !important;
  }

  #search-btn {
    display: block !important;
    font-size: 20px !important;
    color: #444 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
    -webkit-font-smoothing: antialiased !important;
  }

  /* 手機版購物車按鈕透明化與精巧比例 */
  .premium-cart-btn {
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin-left: 0 !important;
    box-shadow: none !important;
  }
  .premium-cart-btn:hover {
    background: transparent !important;
    transform: none !important;
  }
  .premium-cart-btn i {
    font-size: 20px !important;
    color: #444 !important;
    line-height: 1 !important;
    transition: color 0.2s ease !important;
    -webkit-font-smoothing: antialiased !important;
  }
  .premium-cart-btn .cart-badge {
    top: -5px !important;
    right: -7px !important;
    min-width: 14px !important;
    height: 14px !important;
    font-size: 8.5px !important;
    padding: 0 3px !important;
  }

  /* 手機版搜尋 UI 調整 */
  #fs-search-input {
    font-size: 24px;
    padding: 10px 0;
  }

  .fs-result-item {
    padding: 15px;
  }

  .fs-result-item .item-name {
    font-size: 14px;
  }

  #fullscreen-search {
    padding-top: 80px;
  }
}

/* 額外針對極小螢幕 (如 iPhone SE) */
@media (max-width: 380px) {
  .logo {
    font-size: 18px !important;
  }
  .header-right {
    gap: 5px !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 手機版主打商品區塊調整 */
@media (max-width: 768px) {
  .apple-slider-track img {
    width: 75vw;
    aspect-ratio: 1 / 1.6 !important;
    margin: 0 10px;
    border-radius: 24px;
  }
  
  .premium-subtitle {
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
  }
  .apple-slider {
    padding: 20px 0 !important;
  }
}

/* ===========================
   Shopping Guide Section Styles
   =========================== */
.guide-section {
  padding: clamp(30px, 5vw, 50px) 30px 10px 30px; /* 大幅縮減底部 padding，拉近與下方 Coffee Knowledge 的距離 */
  background-color: #FFF8F0; /* 統一採用品牌暖奶油杏色 #FFF8F0 */
  color: var(--text-color);
  width: 100%;
  margin-bottom: 0;
}

.guide-header {
  margin-bottom: clamp(30px, 5vw, 50px);
  text-align: center;
  max-width: 1150px;
  margin-left: auto;
  margin-right: auto;
}

.guide-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 32px); /* 與 news-section-title 完全一致 */
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #4A2E1A; /* 醒厚和暖咖啡棕色標題，與 news-section-title 一致 */
  margin-bottom: 8px;
  font-weight: 700;
  text-align: center; /* 標題置中 */
}

.guide-subtitle {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: clamp(16px, 1.8vw, 18px); /* 與空間故事副標題層次完全一致 */
  color: #666;
  letter-spacing: 1px;
  margin: 0 auto;
  text-align: center !important; /* 強制副標題完全置中 */
  display: block;
}

/* 購物教學：下劃線平鋪式頁籤 (極簡精品航空風格) */
.guide-tabs {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 800px !important;
  margin: 0 auto 45px auto !important;
  border-bottom: 1.5px solid #d4cdc3 !important;
  padding: 0 !important;
  gap: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.tab-btn {
  flex: 1 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  margin-bottom: -1.5px !important;
  padding: 14px 20px 16px 20px !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  color: #4A4A4A !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  letter-spacing: 2px !important;
  transition: color 0.25s ease, border-color 0.25s ease !important;
  outline: none !important;
}

.tab-btn:hover {
  color: #B94B22 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-color: rgba(185, 75, 34, 0.35) !important;
}

.tab-btn.active {
  background: transparent !important;
  background-color: transparent !important;
  color: #B94B22 !important;
  font-weight: 700 !important;
  border-bottom: 3px solid #B94B22 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.guide-content {
  display: none;
  animation: fadeIn 0.5s ease-out forwards;
  max-width: 1150px;
  margin: 0 auto;
}

.guide-content.active {
  display: block;
}

/* --- 輪播包裝容器 (Breakout 全螢幕滿版，滑動時無左右邊界) --- */
.carousel-wrapper {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- 輪播左右導覽按鈕 (貼合內容邊界) --- */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.carousel-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.carousel-arrow i {
  font-size: 24px;
  color: var(--text-color);
}

.carousel-arrow.prev {
  left: max(15px, calc((100vw - 1130px) / 2));
}

.carousel-arrow.next {
  right: max(15px, calc((100vw - 1130px) / 2));
}

/* --- 輪播分頁小圓點 --- */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d1d6;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  background: var(--primary-color) !important;
  transform: scale(1.2);
}

/* ===========================
   Shopping Guide Section Styles
   =========================== */

.guide-content {
  display: none;
  animation: fadeIn 0.5s ease-out forwards;
}

.guide-content.active {
  display: block;
}

/* --- 電腦版步驟教學：單一電腦居中按鈕切換版 --- */
.single-desktop-guide {
  max-width: 880px; /* 放寬以容納外移的箭頭，不擠壓 MacBook 尺寸 */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* 讓切換箭頭在單一電腦兩側垂直置中且大小適中 */
.single-desktop-guide .carousel-arrow {
  position: static;
  transform: none;
  flex-shrink: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* --- MacBook Large Mockup CSS (四邊均勻等寬外框，確保截圖 100% 滿版完整呈現) --- */
.macbook-large-mockup {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  flex-shrink: 0;
}

.macbook-large-screen {
  border: 5px solid #232326; /* 四邊 (上、下、左、右) 100% 一致等寬 5px 外框 */
  border-radius: 8px 8px 0 0;
  background: #1a1a1a;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.guide-desktop-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 確保 2880x1800 截圖 100% 完整貼合四邊，絕不切邊 */
  opacity: 0;
  z-index: 1;
  transition: opacity 0.4s ease-in-out;
  display: block;
}

.guide-desktop-img.active {
  opacity: 1;
  z-index: 2;
}

.macbook-large-base {
  height: 8px; /* 俐落超薄底座 */
  background: #d6d6db;
  border-radius: 0 0 10px 10px;
  border-bottom: 2.5px solid #a8a8ad;
  position: relative;
  width: 108%;
  left: -4%;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* --- 下方步驟文字說明 --- */
.desktop-step-desc-wrapper {
  width: 100%;
  max-width: 540px; /* 配合大尺寸筆電調整文字邊界 */
  margin: 0 auto;
  text-align: center;
  min-height: 90px;
}

.desktop-step-desc {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.desktop-step-desc.active {
  display: block;
}

.desktop-step-desc h4 {
  font-size: 21px; /* 增大標題字體 */
  color: var(--text-color);
  margin-bottom: 8px;
  font-weight: 700;
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.5px;
}

.desktop-step-desc p {
  font-size: 15px; /* 增大說明字體 */
  color: var(--subtext-color);
  line-height: 1.6;
  margin: 0;
}

/* --- 手機版步驟教學：單一手機居中按鈕切換版 --- */
.single-mobile-guide {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.guide-display-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 45px; /* 加大左右按鈕與模型之間的間距，讓箭頭外移 */
  width: 100%;
  position: relative;
}

/* 讓切換箭頭在單一手機/電腦兩側垂直置中且大小適中，去除背景與邊框 */
.single-desktop-guide .carousel-arrow,
.single-mobile-guide .carousel-arrow {
  position: static;
  transform: none;
  flex-shrink: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: all 0.25s ease;
}

.single-desktop-guide .carousel-arrow i,
.single-mobile-guide .carousel-arrow i {
  font-size: 32px; /* 放大圖示，提升視覺清晰度 */
  color: var(--text-color);
  opacity: 0.6;
  transition: all 0.25s ease;
}

.single-desktop-guide .carousel-arrow:hover i,
.single-mobile-guide .carousel-arrow:hover i {
  opacity: 1.0;
  color: var(--text-color);
}

.single-desktop-guide .carousel-arrow.prev:hover,
.single-mobile-guide .carousel-arrow.prev:hover {
  margin-left: -6px; /* 懸停時往左微移 */
  background: transparent;
  box-shadow: none;
}

.single-desktop-guide .carousel-arrow.next:hover,
.single-mobile-guide .carousel-arrow.next:hover {
  margin-right: -6px; /* 懸停時往右微移 */
  background: transparent;
  box-shadow: none;
}

.single-mobile-guide .carousel-arrow.prev {
  left: auto;
}

.single-mobile-guide .carousel-arrow.next {
  right: auto;
}

/* --- iPhone 17 Large Mockup CSS (用於單一手機切換) --- */
.iphone-metallic-frame {
  position: relative;
  border-radius: 40px;
  padding: 2px; /* 用 Padding 做出外圍精緻鈦金屬線 */
  background: linear-gradient(135deg, 
    #7a7a7a 0%, 
    #c2c2c2 15%, 
    #4a4a4a 45%, 
    #e8e8e8 70%, 
    #8f8f8f 85%, 
    #5c5c5c 100%
  );
  box-shadow: 
    0 25px 50px rgba(0,0,0,0.18), 
    0 10px 20px rgba(0,0,0,0.1),
    0 2px 4px rgba(0,0,0,0.05);
  flex-shrink: 0;
  display: inline-block;
}

/* 實體按鍵共用樣式 */
.iphone-btn {
  position: absolute;
  background: linear-gradient(to bottom, #8f8f94, #5c5c62);
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

/* 左側按鍵 (Action鍵、音量大鍵、音量小鍵) */
.iphone-btn-action, .iphone-btn-vol-up, .iphone-btn-vol-down {
  left: -2px; /* 貼合邊緣並往外凸出 */
  width: 2px;
  border-radius: 2px 0 0 2px;
}

/* 動作按鍵 (Action Button) - 小而精緻 */
.iphone-btn-action {
  top: 75px;
  height: 12px;
}

/* 音量大鍵 (Volume Up) */
.iphone-btn-vol-up {
  top: 96px;
  height: 24px;
}

/* 音量小鍵 (Volume Down) */
.iphone-btn-vol-down {
  top: 126px;
  height: 24px;
}

/* 右側按鍵 (電源按鍵) */
.iphone-btn-power {
  right: -2px; /* 貼合邊緣並往外凸出 */
  width: 2px;
  border-radius: 0 2px 2px 0;
  top: 110px;
  height: 48px;
}


/* --- 購物教學：手機版三機卡片並排輪播 --- */
.multi-mobile-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1080px;
  margin: 0 auto;
  gap: 20px;
}

.multi-mobile-carousel .carousel-arrow {
  position: static;
  transform: none;
  flex-shrink: 0;
}

.multi-mobile-viewport {
  width: 100%;
  max-width: 880px;
  overflow: hidden;
  padding: 15px 0 25px 0;
}

.multi-mobile-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  gap: 28px;
  will-change: transform;
}

.mobile-step-card {
  flex: 0 0 calc((100% - 56px) / 3);
  max-width: calc((100% - 56px) / 3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

.mobile-step-card .iphone-metallic-frame {
  margin-bottom: 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-step-card:hover .iphone-metallic-frame {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.22), 0 12px 24px rgba(0,0,0,0.12);
}

.mobile-step-card .iphone-large-mockup {
  width: 195px;
  height: 422px;
  border: 3.5px solid #0d0d0d;
  border-radius: 34px;
  position: relative;
  background: #000;
  overflow: hidden;
  display: block;
}

.mobile-step-card .iphone-large-screen {
  width: 100%;
  height: 100%;
  background: white;
  position: relative;
}

.mobile-step-card .guide-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3D 玻璃反光折射遮罩層 */
.iphone-screen-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.18) 0%, 
    rgba(255, 255, 255, 0.08) 25%, 
    rgba(255, 255, 255, 0) 25.5%, 
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 5;
  pointer-events: none;
}

.iphone-notch {
  width: 44px;
  height: 9px;
  background: #000;
  border-radius: 20px;
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 0 1px rgba(255,255,255,0.1);
}

.iphone-home-bar {
  width: 55px;
  height: 3px;
  background: rgba(0,0,0,0.25);
  border-radius: 5px;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* --- 下方步驟文字說明 --- */
.card-step-desc {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  text-align: center;
}

.card-step-desc h4 {
  font-size: 18px;
  color: #4A2E1A;
  margin-bottom: 8px;
  font-weight: 700;
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.5px;
}

.card-step-desc p {
  font-size: 13.5px;
  color: #666;
  line-height: 1.6;
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .guide-tabs {
    width: 90%;
    max-width: 360px;
    margin-bottom: 30px;
  }
  .tab-btn {
    padding: 10px 6px 12px 6px;
    font-size: 14.5px;
    letter-spacing: 0.8px;
  }

  /* 行動版畫面下，將左右箭頭改為絕對定位，避免模型寬度擠壓導致按鈕被推出螢幕 */
  .guide-display-row {
    position: relative;
    width: 100%;
    justify-content: center;
  }

  .single-desktop-guide .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20; /* 提升層級確保可被點擊 */
    width: 38px;  /* 行動端按鈕稍微縮小 */
    height: 38px;
  }

  /* 電腦版教學的左右按鈕行動端定位 (往外微調，增加呼吸空間) */
  .single-desktop-guide .carousel-arrow.prev {
    left: -4px;
  }
  .single-desktop-guide .carousel-arrow.next {
    right: -4px;
  }

  /* 手機版教學三機卡片在手機端的自適應 (單一展示 + 置中箭頭) */
  .multi-mobile-carousel {
    gap: 0;
    width: 100%;
    position: relative;
  }

  .multi-mobile-carousel .carousel-arrow {
    position: absolute;
    top: 36%;
    transform: translateY(-50%);
    z-index: 20;
    width: 38px;
    height: 38px;
  }

  .multi-mobile-carousel .carousel-arrow.prev {
    left: 2px;
  }

  .multi-mobile-carousel .carousel-arrow.next {
    right: 2px;
  }

  .multi-mobile-viewport {
    max-width: 100%;
    padding: 10px 0 20px 0;
  }

  .multi-mobile-track {
    gap: 0;
  }

  .mobile-step-card {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
  }

  .mobile-step-card .iphone-metallic-frame {
    margin-bottom: 16px;
  }

  .mobile-step-card .iphone-large-mockup {
    width: 215px;
    height: 466px;
  }

  .card-step-desc {
    max-width: 320px;
  }

  .card-step-desc h4 {
    font-size: 20px;
  }

  .card-step-desc p {
    font-size: 14.5px;
  }

  /* 允許模型在手機網頁寬度下自適應縮小，不被 flex-shrink 限制而爆版 */
  .macbook-large-mockup {
    max-width: 72%; /* 從 78% 縮減至 72%，為左右箭頭釋放更充裕的外部間距 */
    flex-shrink: 1 !important;
  }
}

@media (max-width: 900px) and (min-width: 601px) {
  .multi-mobile-viewport {
    max-width: 580px;
  }
  .mobile-step-card {
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
}

/* ==========================================================================
   RWD Banner Cover Crop (手機版滿版橫幅自動裁切 - 比照星巴克響應式設計)
   ========================================================================== */
@media (max-width: 768px) {
  .full-width-banner {
    height: clamp(240px, 35vh, 320px) !important;
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  .full-width-banner img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important; /* 從中央自動裁切，保留核心主體 */
  }
}

/* ==========================================================================
   Global Add To Cart Button for Product Detail Pages
   ========================================================================== */
.add-to-cart-btn {
  width: 100%;
  background: #7E8D61;
  color: #fff;
  border: none;
  padding: 14px 0;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.3s ease, transform 0.2s ease;
}
.add-to-cart-btn:hover {
  background: #5f6f4c;
}
.add-to-cart-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Product Detail Breadcrumb Navigation (商品詳情頁麵包屑導航)
   ========================================================================== */
.breadcrumb-nav {
  max-width: 1150px;
  width: 100%;
  margin: 20px auto 0;
  padding: 0 clamp(24px, 3.5vw, 40px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #888;
  font-family: 'Noto Sans TC', sans-serif;
}

.breadcrumb-nav a {
  color: #7E8D61;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb-nav a:hover {
  color: #4A2E1A;
  text-decoration: underline;
}

.breadcrumb-nav .separator {
  color: #ccc;
  font-size: 12px;
}

.breadcrumb-nav .current {
  color: #4A2E1A;
  font-weight: 500;
}

.back-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #7E8D61;
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.back-link-btn:hover {
  color: #4A2E1A;
  transform: translateX(-3px);
}

@media (max-width: 768px) {
  .breadcrumb-nav {
    padding: 0 20px;
    margin: 15px auto 0;
    font-size: 12px;
  }
}

/* ==========================================
   加價購專區樣式 (Add-on Purchase Components)
   ========================================== */
.addon-purchase-box {
  margin: 18px 0 20px 0;
  background: #FAF7F2;
  border: 1.5px dashed #D5C3AB;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.25s ease;
}
.addon-box-header {
  font-size: 13px;
  font-weight: 700;
  color: #8C6D48;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.addon-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  width: 100%;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid rgba(213, 195, 171, 0.4);
}
.addon-item-row:first-of-type {
  border-top: none;
  padding-top: 0;
}
.addon-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #7E8D61;
  cursor: pointer;
  flex-shrink: 0;
}
.addon-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #E8E2D8;
}
.addon-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.addon-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.addon-tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.addon-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #C1A57B;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.addon-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #4A2E1A;
}
.addon-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.addon-price {
  font-size: 14.5px;
  font-weight: 700;
  color: #9E2A2B;
  font-family: 'Noto Sans TC', sans-serif;
}
.addon-orig-price {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

/* 側邊購物車與購物車頁加購橫條 */
.sidebar-addon-box {
  margin: 10px 0;
  background: #FAF7F2;
  border: 1px dashed #D5C3AB;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sidebar-addon-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-addon-left img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #E8E2D8;
}
.sidebar-addon-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #C1A57B;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 2px;
}
.sidebar-addon-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #4A2E1A;
  line-height: 1.2;
}
.sidebar-addon-price {
  font-size: 13px;
  font-weight: 700;
  color: #9E2A2B;
  margin-top: 2px;
}
.sidebar-addon-price s {
  color: #aaa;
  font-size: 11px;
  margin-left: 4px;
  font-weight: normal;
}
.sidebar-addon-btn {
  background: #7E8D61;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.sidebar-addon-btn:hover {
  background: #68754F;
}

/* ==========================================================================
   Clickable Product Image Link (商品卡片照片連結)
   ========================================================================== */
.product-img-link {
  display: block;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

.product-img-link img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.product-img-link:hover img {
  transform: scale(1.03);
  filter: brightness(1.02);
}

/* ==========================================================================
   Coffee Bean Detail Page - Modern Specialty Coffee Redesign
   ========================================================================== */

/* 頂部標題與價格水平佈局 */
.product-header-modern {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ECE6DE;
}

.product-title-wrap h1 {
  font-size: 28px;
  font-weight: 700;
  color: #4A2E1A;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.product-title-wrap h4 {
  font-size: 14px;
  font-weight: 500;
  color: #C1A57B;
  letter-spacing: 1.5px;
  margin: 0;
  text-transform: uppercase;
  font-family: 'Noto Sans TC', sans-serif;
}

.product-price-prominent {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}

.product-price-prominent .price-currency {
  font-size: 16px;
  font-weight: 700;
  color: #7E8D61;
}

.product-price-prominent .price-amount {
  font-size: 32px;
  font-weight: 800;
  color: #7E8D61;
  font-family: 'Noto Sans TC', sans-serif;
  letter-spacing: -0.5px;
}

/* 風味調性膠囊標籤 (Flavor Notes Chips) */
.flavor-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.flavor-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FAF7F2;
  color: #5D432C;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #E8E0D5;
  transition: all 0.25s ease;
}

.flavor-chip i {
  color: #C1A57B;
  font-size: 13px;
}

.flavor-chip:hover {
  background: #F3ECE1;
  border-color: #D5C7B4;
}

.roast-badge-chip {
  background: rgba(126, 141, 97, 0.12);
  color: #58693C;
  border-color: rgba(126, 141, 97, 0.3);
}

.roast-badge-chip i {
  color: #7E8D61;
}

/* 簡述段落 */
.product-intro-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: #5A524C;
  margin: 0 0 22px 0;
  text-align: justify;
}

/* 規格切換膠囊按鈕 (Spec Pills) */
.spec-selector-box {
  margin-bottom: 22px;
}

.spec-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.spec-selector-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #4A2E1A;
  letter-spacing: 0.5px;
}

.spec-selector-hint {
  font-size: 12px;
  color: #8C827A;
}

.spec-pills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.spec-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: #ffffff;
  border: 2px solid #E5DFD7;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  font-family: inherit;
}

.spec-pill:hover {
  border-color: #C1A57B;
  background: #FAF7F2;
  transform: translateY(-2px);
}

.spec-pill.active {
  border-color: #7E8D61;
  background: rgba(126, 141, 97, 0.05);
  box-shadow: 0 4px 14px rgba(126, 141, 97, 0.15);
}

.spec-pill.active::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7E8D61;
}

.spec-pill-weight {
  font-size: 15px;
  font-weight: 700;
  color: #4A2E1A;
  margin-bottom: 2px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.spec-pill-sub {
  font-size: 12px;
  color: #8C827A;
  font-weight: normal;
}

.spec-pill-price {
  font-size: 16px;
  font-weight: 800;
  color: #7E8D61;
  font-family: 'Noto Sans TC', sans-serif;
  margin-top: 4px;
}

.spec-pill.active .spec-pill-weight {
  color: #2F3E1E;
}

/* 主購買列：數量加減 + 加入購物車按鈕 */
.purchase-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  width: 100%;
}

.detail-quantity-box {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  width: 118px;
  background: #FAF7F2;
  border: 1.5px solid #E5DFD7;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}

.detail-qty-btn {
  width: 36px;
  height: 100%;
  border: none;
  background: transparent;
  color: #4A2E1A;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.detail-qty-btn:hover {
  background: rgba(193, 165, 123, 0.18);
  color: #2F3E1E;
}

.detail-qty-btn:active {
  background: rgba(193, 165, 123, 0.3);
  transform: scale(0.92);
}

.detail-qty-input {
  width: 44px;
  height: 100%;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: #4A2E1A;
  font-family: 'Noto Sans TC', sans-serif;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}

.detail-qty-input::-webkit-outer-spin-button,
.detail-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 主按鈕：加入購物車 (與數量選擇器並列自適應填滿) */
.detail-cta-btn {
  flex: 1;
  height: 50px;
  background: #7E8D61 !important;
  color: #ffffff;
  border: none;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(126, 141, 97, 0.32);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-bottom: 0;
  white-space: nowrap;
}

.detail-cta-btn:hover {
  background: #68754F !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(126, 141, 97, 0.42);
}

.detail-cta-btn:active {
  transform: translateY(0) scale(0.99);
}

/* 商品詳情頁即時庫存提示標籤與售完狀態 (模式 A) */
.detail-stock-status {
  margin: -10px 0 16px 0;
  display: flex;
  align-items: center;
  min-height: 28px;
}

.detail-stock-status:empty {
  display: none;
}

.detail-stock-status .stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
  font-family: 'Noto Sans TC', sans-serif;
  letter-spacing: 0.3px;
}

.detail-stock-status .stock-pill.in-stock {
  color: #2e7d32;
  background: #edf7ed;
  border: 1px solid #c8e6c9;
}

.detail-stock-status .stock-pill.low-stock {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  animation: pulse-soft 2.2s infinite ease-in-out;
}

.detail-stock-status .stock-pill.sold-out {
  color: #c62828;
  background: #ffebee;
  border: 1px solid #ffcdd2;
}

.detail-stock-status .stock-pill.in-cart-max {
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.88; transform: scale(1.02); }
}

.detail-cta-btn:disabled,
.detail-cta-btn.is-sold-out {
  background: #d1d5db !important;
  color: #6b7280 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.8 !important;
}

.detail-quantity-box.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  background: #f3f4f6;
}

/* 緊湊精緻加價購區塊 (移至購物車按鈕下方) */
.product-description .addon-purchase-box {
  margin-top: 0;
  margin-bottom: 25px;
  background: #FAF7F2;
  border: 1px dashed #D5C7B4;
  border-radius: 12px;
  padding: 14px 16px;
}

/* 咖啡與甜點特色小卡 (Profile Grid) */
.coffee-profile-card,
.dessert-profile-card {
  background: #FFFFFF;
  border: 1px solid #ECE6DE;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.coffee-profile-title,
.dessert-profile-title {
  font-size: 14px;
  font-weight: 700;
  color: #4A2E1A;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}

.coffee-profile-title i,
.dessert-profile-title i {
  color: #C1A57B;
  font-size: 16px;
}

.coffee-profile-grid,
.dessert-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.profile-item {
  display: flex;
  flex-direction: column;
}

.profile-label {
  font-size: 12px;
  color: #8C827A;
  margin-bottom: 3px;
}

.profile-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #4A2E1A;
  line-height: 1.4;
}

@media (max-width: 576px) {
  .product-header-modern {
    flex-direction: column;
    gap: 8px;
  }
  .product-title-wrap h1 {
    font-size: 24px;
  }
  .product-price-prominent .price-amount {
    font-size: 26px;
  }
  .coffee-profile-grid,
  .dessert-profile-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ==========================================================================
   Product Detail - Bottom Sections (Add-on, Shipping/Payment Guide, Related)
   ========================================================================== */

.detail-bottom-container {
  max-width: 1150px;
  width: 100%;
  margin: 10px auto 70px;
  padding: 0 clamp(24px, 3.5vw, 40px);
  box-sizing: border-box;
}

/* 1. 超值加價購專區 (底部橫向卡片) */
.bottom-addon-section {
  background: #FAF7F2;
  border: 1px dashed #D5C7B4;
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 45px;
  text-align: left;
}

.detail-section-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #4A2E1A;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.detail-section-title i {
  color: #C1A57B;
  font-size: 18px;
}

.section-title-sub {
  font-size: 13px;
  font-weight: normal;
  color: #8C827A;
  margin-left: 6px;
}

.bottom-addon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}

.bottom-addon-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1.5px solid #EBE5DC;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  text-align: left;
}

.bottom-addon-card:hover {
  border-color: #C1A57B;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 46, 26, 0.05);
}

.bottom-addon-card.preview-only {
  cursor: default;
  justify-content: space-between;
}

.bottom-addon-card.preview-only:hover {
  transform: none;
  border-color: #EBE5DC;
  box-shadow: none;
}

.bottom-addon-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.bottom-addon-cart-badge {
  font-size: 12px;
  color: #5B6B3F;
  background: #F4F7EE;
  border: 1px solid #D5DEC4;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-addon-limit-tag {
  display: inline-block;
  font-size: 11px;
  color: #9E2A2B;
  background: #FBF0EE;
  border: 1px solid #F5D3CD;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
  align-self: flex-start;
  font-weight: 600;
}

.bottom-addon-checkbox-wrap {
  display: flex;
  align-items: center;
}

.bottom-addon-checkbox-wrap .addon-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #7E8D61;
  cursor: pointer;
}

.bottom-addon-thumb img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #ECE6DE;
  display: block;
}

.bottom-addon-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  justify-content: center;
}

.bottom-addon-tag {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #C1A57B;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 4px 0;
  text-align: left;
  line-height: 1.3;
}

.bottom-addon-name {
  font-size: 14px;
  font-weight: 600;
  color: #4A2E1A;
  margin: 0 0 3px 0;
  text-align: left;
  align-self: flex-start;
  line-height: 1.35;
  width: auto;
}

.bottom-addon-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  text-align: left;
  align-self: flex-start;
}

.addon-now-price {
  font-size: 15px;
  font-weight: 800;
  color: #9E2A2B;
  font-family: 'Noto Sans TC', sans-serif;
  margin: 0;
  text-align: left;
}

.addon-was-price {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  margin: 0;
}

/* 2. 取貨與付款方式詳細指南卡片 (比照上傳圖片規範) */
.detail-guide-card {
  background: #ffffff;
  border: 1px solid #EBE5DC;
  border-radius: 16px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: 0 4px 20px rgba(74, 46, 26, 0.03);
  margin-bottom: 50px;
}

.guide-block {
  text-align: left;
}

/* 手風琴標題與切換按鈕 */
.guide-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.guide-main-title {
  font-size: 21px;
  font-weight: 700;
  color: #4A2E1A;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.guide-main-title i {
  color: #C1A57B;
  font-size: 22px;
}

.guide-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FAF7F2;
  border: 1px solid #ECE6DE;
  color: #4A2E1A;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
}

.guide-accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.guide-accordion-inner {
  overflow: hidden;
}

.accordion-block.is-open .guide-accordion-content {
  grid-template-rows: 1fr;
}

.accordion-block.is-open .guide-accordion-toggle i {
  transform: rotate(180deg);
}

.accordion-block.is-open .guide-accordion-toggle {
  background: rgba(126, 141, 97, 0.12);
  border-color: #7E8D61;
  color: #58693C;
}

/* 電腦版與平板 (> 768px)：固定完整展開，隱藏切換按鈕 */
@media (min-width: 769px) {
  .guide-accordion-toggle {
    display: none !important;
  }
  .guide-accordion-content {
    display: block !important;
    grid-template-rows: unset !important;
  }
  .guide-accordion-inner {
    overflow: visible !important;
  }
  .guide-accordion-header {
    cursor: default !important;
  }
}

/* 手機版 (<= 768px)：啟用手風琴折疊 */
@media (max-width: 768px) {
  .guide-accordion-header {
    cursor: pointer;
    padding: 6px 0;
  }
  .guide-accordion-header .guide-main-title {
    margin-bottom: 0 !important;
    font-size: 18px;
  }
  .accordion-block.is-open .guide-accordion-header {
    padding-bottom: 12px;
  }
  .accordion-block:not(.is-open) + .guide-divider {
    margin: 16px 0;
  }
  .guide-divider {
    margin: 22px 0;
  }
  .detail-guide-card {
    padding: 20px 18px;
  }
}

.guide-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: #4A2E1A;
  margin: 18px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-list li {
  font-size: 14px;
  line-height: 1.85;
  color: #555;
  margin-bottom: 6px;
}

.guide-address-box {
  background: #FAF7F2;
  border-left: 3.5px solid #C1A57B;
  padding: 14px 18px;
  border-radius: 8px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #4A2E1A;
}

.guide-text-row {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

.guide-text-row strong {
  color: #4A2E1A;
}

.guide-divider {
  border: none;
  border-top: 1px solid #ECE6DE;
  margin: 32px 0;
}

.guide-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  margin: 4px 0 0 0;
}

.guide-link {
  color: #7E8D61;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.guide-link:hover {
  color: #58693C;
}

/* 3. 底部相關商品推薦專區 */
.detail-bottom-related {
  margin-top: 20px;
  text-align: left;
}

.related-bottom-header {
  margin-bottom: 22px;
}

.related-bottom-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #4A2E1A;
  margin: 0 0 6px 0;
  letter-spacing: 0.5px;
}

.related-bottom-header p {
  font-size: 13.5px;
  color: #8C827A;
  margin: 0;
}

.bottom-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.bottom-related-grid.grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.bottom-related-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #ECE6DE;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  height: 100%;
}

.bottom-related-card:hover {
  transform: translateY(-4px);
  border-color: #C1A57B;
  box-shadow: 0 10px 25px rgba(74, 46, 26, 0.08);
}

.bottom-card-img {
  width: 100%;
  min-width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
}

.bottom-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.bottom-related-card:hover .bottom-card-img img {
  transform: scale(1.06);
}

.bottom-card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #7E8D61;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
  padding: 3px 9px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 2;
}

.bottom-card-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  background: #ffffff;
}

.bottom-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #4A2E1A;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.bottom-card-desc {
  font-size: 12.5px;
  color: #777;
  line-height: 1.5;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bottom-card-price {
  font-size: 15.5px;
  font-weight: 800;
  color: #7E8D61;
  font-family: 'Noto Sans TC', sans-serif;
  margin-top: auto;
}

@media (max-width: 992px) {
  .bottom-related-grid.grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .bottom-addon-section {
    padding: 16px 14px;
    margin-bottom: 32px;
    border-radius: 12px;
  }

  .detail-section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 15.5px;
    margin-bottom: 12px;
  }

  .section-title-sub {
    margin-left: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #8C827A;
  }

  .bottom-addon-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* 手機版：商品卡片改為上下分層，縮圖與品名價格享有完整寬度，徹底擺脫擁擠感 */
  .bottom-addon-card.preview-only {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 12px;
  }

  .bottom-addon-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
  }

  .bottom-addon-info {
    align-items: flex-start;
    text-align: left;
  }

  .bottom-addon-thumb img {
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 10px;
  }

  .bottom-addon-tag {
    align-self: flex-start;
    text-align: left;
    margin: 0 0 4px 0;
  }

  .bottom-addon-name {
    font-size: 15px;
    line-height: 1.35;
    word-break: break-word;
    text-align: left;
    align-self: flex-start;
    margin: 0 0 3px 0;
  }

  .bottom-addon-price-row {
    align-self: flex-start;
    text-align: left;
    margin: 0;
  }

  .bottom-addon-cart-badge {
    width: 100%;
    justify-content: center;
    padding: 7px 12px;
    font-size: 12.5px;
    background: #F4F7EE;
    border: 1px solid #D5DEC4;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(126, 141, 97, 0.08);
  }

  .bottom-related-grid,
  .bottom-related-grid.grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .bottom-card-img {
    width: 100%;
    min-width: 100%;
  }
  .bottom-card-info {
    padding: 10px 12px 14px;
  }
  .bottom-card-title {
    font-size: 13.5px;
    margin-bottom: 4px;
  }
  .bottom-card-desc {
    display: none;
  }
  .bottom-card-price {
    font-size: 14px;
  }
}