@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 5%;
  height: 85px;
  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: 70px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

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

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

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

.logo img {
  height: clamp(50px, 8vw, 70px);
  padding: 0px 15px;
}

/* 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: 5px 15px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  width: 150px;
}

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

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  padding: 5px 10px;
  width: 100%;
  font-size: 14px;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', 'Songti TC', 'Songti SC', 'Noto Serif TC', serif;
  font-weight: normal;
}

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

/* 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;
}

nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
  font-weight: normal;
}

nav a {
  position: relative;
  padding: 8px 0;
  margin: 0 12px;
  font-size: clamp(14px, 1.5vw, 16px);
  transition: color 0.3s ease;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', 'Songti TC', 'Songti SC', 'Noto Serif TC', 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.88);
  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: 190px; /* 增加寬度以舒適容納英文副標題 */
  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: 11px 18px 10px; /* 稍微增加上下留白，適配雙行文字 */
  font-weight: normal;
  font-size: 14px;
  color: #4A2E1A; /* 品牌深咖啡色 */
  white-space: nowrap;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', 'Songti TC', 'Songti SC', 'Noto Serif TC', serif;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.3;
}

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

/* 英文副標題共用樣式 */
.dropdown__menu a::after {
  display: block;
  font-size: 10px;
  color: #8C7F73; /* 柔和沙褐色 */
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic; /* 使用優雅的斜體襯線字 */
  margin-top: 3px;
  letter-spacing: 0.5px;
  opacity: 0.8;
  transition: color 0.25s ease;
}

.dropdown__menu a:hover::after {
  color: #9AA882; /* 懸停時英文同步變亮 */
}

/* 透過 CSS 自動為 20 個網頁的選單項目注入不同的英文副標，免改 HTML */
.dropdown__menu a:nth-child(1)::after {
  content: 'Coffee Selection';
}

.dropdown__menu a:nth-child(2)::after {
  content: 'Other Beverages';
}

.dropdown__menu a:nth-child(3)::after {
  content: 'Savory Delights';
}

.dropdown__menu a:nth-child(4)::after {
  content: 'Handmade Dessert';
}

.dropdown__menu a:nth-child(5)::after {
  content: 'Roastery Beans';
}

.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: center;
  gap: 25px;
  margin: 25px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.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: #fff;
  border-top: 1px solid #eee;
  padding: 45px 20px 30px; /* 壓縮上下內邊距：由 60px/40px 減至 45px/30px */
  font-size: 14px;
  color: var(--subtext-color);
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px; /* 稍微縮小間距，更加緊湊 */
  max-width: 1100px;
  margin: 0 auto 30px; /* 下邊距由 40px 減至 30px */
  text-align: left;
}

.footer-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #4A2E1A;
  margin-bottom: 16px; /* 標題下邊距由 25px 壓縮至 16px */
  position: relative;
}

.footer-section h3::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: #C1A57B;
  margin-top: 6px;
}

.footer-section p, .footer-section ul {
  color: #666;
  line-height: 1.7; /* 行高由 1.8 微調至 1.7，高度更合理 */
  font-size: 14px;
}

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

.footer-section ul li {
  margin-bottom: 8px; /* 清單間距由 12px 壓縮至 8px */
}

.footer-section ul li a {
  text-decoration: none;
  color: #666;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-section i {
  margin-right: 10px;
  color: #7E8D61;
}

.footer-social a {
  color: var(--subtext-color);
  margin-right: 15px;
  font-size: 24px;
  transition: all 0.3s;
  display: inline-block;
}

.footer-social a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-divider {
  border-top: 1px solid #eee;
  margin: 0 auto 20px; /* 分割線下邊距由 30px 減至 20px */
  max-width: 1100px;
}

.footer-bottom-links {
  margin-bottom: 15px; /* 底部連結下邊距由 20px 減至 15px */
}

.footer-bottom-links a {
  color: #666; /* 顏色加深：由 #999 改為較深的 #666 */
  text-decoration: none;
  margin: 0 15px;
  font-size: 13px;
  transition: color 0.3s;
}

.footer-bottom-links a:hover {
  color: var(--primary-color);
}

.footer-detail p {
  font-size: 12px;
  color: #888; /* 顏色加深：由極淡的 #bbb 改為更清晰的 #888 */
  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;
}

.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: 18px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(74, 46, 26, 0.06);
  }

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

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

  .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;
  }
}

/* ===========================
   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: 60px;
  max-width: 1150px;
  margin: 40px auto;
  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;
  }
}
.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: 28px;
  cursor: pointer;
  color: var(--primary-color);
  z-index: 10;
}

/* 行動版側邊欄樣式 */
#mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  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%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  z-index: 10002;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: 40px 10%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.1);
}

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

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-header .logo-text,
.logo-text {
  font-family: 'Qwitcher Grypen', cursive !important;
  font-size: 36px !important;
  font-weight: 700 !important;
  color: #2C221E !important;
  white-space: nowrap !important;
}

.sidebar-close {
  font-size: 32px;
  cursor: pointer;
  color: #333;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* 側邊欄導覽項目統一對齊 */
/* 讓文字與 icon 作為一個整體置中顯示 */
.sidebar-nav > a,
.sidebar-dropdown-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 18px 0 !important;
  font-size: 20px !important;
  font-weight: bold !important;
  border-bottom: none !important;
  width: 100% !important;
  max-width: 240px !important; /* 限制寬度讓文字與 icon 保持整體置中 */
  color: #333 !important;
  cursor: pointer !important;
  text-align: center !important;
  text-decoration: none !important;
  margin: 0 auto !important; /* 確保整個 a 標籤在 nav 內置中 */
}

/* 用 inline-flex 讓文字與 icon 作為一組一起置中 */
.sidebar-nav > a::before,
.sidebar-dropdown-btn::before {
  display: none;
}

.sidebar-nav > a i,
.sidebar-dropdown-btn i {
  font-size: 20px;
  color: var(--primary-color);
  width: 24px; /* 固定圖示寬度，方便排版 */
  text-align: center;
  display: block;
}

.sidebar-dropdown-btn i {
  transition: transform 0.3s ease;
}

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

.sidebar-sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(126, 141, 97, 0.05);
  border-radius: 20px;
  padding: 0;
  margin: 0;
  opacity: 0;
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

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

/* 強制側邊欄選單垂直排列，防止被頁面內部的 nav a 樣式干擾 */
#mobile-sidebar .sidebar-sub-menu a {
  display: block !important;
  width: 100% !important;
  font-size: 16px !important;
  font-weight: normal !important;
  padding: 12px 0 !important;
  border-bottom: none !important;
  color: #666 !important;
  text-align: center !important;
  margin: 0 !important;
}

#mobile-sidebar .sidebar-sub-menu a:last-child {
  border-bottom: none !important;
}

#dropdown-arrow {
  transition: transform 0.3s ease;
}

/* 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: 70px !important;
    padding: 0 20px !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 {
    display: none !important; /* 手機版隱藏 Dream House Coffee 文字 */
  }

  .logo img {
    height: 45px !important;
    padding: 0 !important;
  }

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

  /* 漢堡按鈕移至最右側 */
  #mobile-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    order: 3 !important;
    margin-right: 0 !important;
    font-size: 30px !important;
    cursor: pointer !important;
    height: 100% !important;
  }
  
  .search-box {
    display: none !important;
  }

  #search-btn {
    display: block !important;
    font-size: 26px !important;
    color: var(--primary-color);
  }

  /* 手機版搜尋 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: 15px; /* 與最新消息副標題層次完全一致 */
  color: #666;
  letter-spacing: 1px;
  margin: 0 auto;
  text-align: center !important; /* 強制副標題完全置中 */
  display: block;
}

.guide-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 45px;
  max-width: 1150px;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--subtext-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn i {
  font-size: 16px;
}

.tab-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(126, 141, 97, 0.25);
}

.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
   =========================== */
/* 已移除重複宣告以保持 CSS 乾淨 */

.tab-btn {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--subtext-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn i {
  font-size: 16px;
}

.tab-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(126, 141, 97, 0.25);
}

.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 (用於單一電腦切換) --- */
.macbook-large-mockup {
  width: 100%;
  max-width: 660px; /* 電腦版最大寬度由 580px 放大至 660px，進一步提升細節清晰度 */
  margin: 0 auto;
  position: relative;
  flex-shrink: 0;
}

.macbook-large-screen {
  border: 12px solid #1a1a1a; /* 配合尺寸微調邊框 */
  border-radius: 16px 16px 0 0;
  background: #000;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.guide-desktop-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.4s ease-in-out;
}

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

.macbook-large-base {
  height: 9px; /* 配合尺寸微調底座厚度 */
  background: #d1d1d6;
  border-radius: 0 0 12px 12px;
  border-bottom: 3px solid #a1a1a6;
  position: relative;
  width: 112%;
  left: -6%;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* --- 下方步驟文字說明 --- */
.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: 'Playfair Display', serif;
}

.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;
}


.iphone-large-mockup {
  width: 220px;    /* 寬度放大為 220px */
  height: 477px;   /* 高度等比例放大至 477px，維持完美的 19.5:9 (1 : 2.17) iPhone 17 Pro 螢幕比例 */
  border: 4px solid #0d0d0d; /* 極窄黑邊螢幕外框 */
  border-radius: 38px;
  position: relative;
  background: #000;
  overflow: hidden;
  display: block;
}

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

.guide-mobile-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 設回 cover。因為容器比例已完全對齊，截圖會 100% 完美滿版貼合、絕不切邊 */
  opacity: 0;
  z-index: 1;
  transition: opacity 0.4s ease-in-out;
}

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

/* 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: 48px;
  height: 10px;
  background: #000;
  border-radius: 20px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 0 1px rgba(255,255,255,0.1);
}

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

/* --- 下方步驟文字說明 --- */
.mobile-step-desc-wrapper {
  width: 100%;
  max-width: 360px; /* 限制寬度防止文字邊界太寬 */
  margin: 0 auto;
  text-align: center;
  min-height: 90px;
}

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

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

.mobile-step-desc h4 {
  font-size: 21px; /* 增大標題字體 */
  color: var(--text-color);
  margin-bottom: 8px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

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

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

@media (max-width: 600px) {
  .guide-tabs {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .tab-btn {
    width: 100%;
    justify-content: center;
  }

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

  .single-desktop-guide .carousel-arrow,
  .single-mobile-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;
  }

  /* 手機版教學的左右按鈕行動端定位 */
  .single-mobile-guide .carousel-arrow.prev {
    left: 4px;
  }
  .single-mobile-guide .carousel-arrow.next {
    right: 4px;
  }

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

  .iphone-metallic-frame {
    max-width: 68%; /* 給左右箭頭預留側邊空間 */
    flex-shrink: 1 !important;
  }
}

/* ==========================================================================
   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: 1100px;
  margin: 20px auto 0;
  padding: 0 30px;
  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;
  }
}
