/* =====================================================================
   手機版與選單設定
   ---------------------------------------------------------------------
   ・想調整手機版，改這個檔案就好，存檔後網站會自動更新。
   ・最常調的數字都集中在下面「可調整的數值」，改數字即可。
   ・斜線星號包起來的中文是說明文字，不會影響網站。
   ===================================================================== */


/* ── ☰ 選單：螢幕比這個寬度窄時，上方選單收成 ☰ 按鈕 ─────────────── */
@media (max-width: 1100px) {
  .nav-desktop { display: none !important; }
  .nav-toggle  { display: inline-flex !important; }
}
@media (min-width: 1101px) {
  .nav-mobile  { display: none !important; }
}


/* ── 手機版：螢幕寬度 768px 以下時套用 ─────────────────────────────── */
@media (max-width: 768px) {

  :root {
    /* ===== 可調整的數值 ===== */
    --m-product-cols: 2;             /* 產品頁：商品一排幾個 */
    --m-partner-cols: 1;             /* 合作與媒體：合作案一排幾個 */
    --m-expo-cols: 3;                /* 展覽照片：一排幾張 */
    --m-hero-height: 62vh;           /* 首頁大圖的高度（vh = 螢幕高度的百分比） */
    --m-timeline-img-height: 120px;  /* 品牌故事時間軸照片的高度 */
    --m-header-height: 60px;         /* 上方選單列的高度 */

    /* 字級（電腦版的數值在 tokens/typography.css） */
    --text-4xl: 30px;   /* 頁面大標題，例如「產品」 */
    --text-3xl: 24px;   /* 區塊標題，例如「特色」 */
    --text-2xl: 22px;
    --text-xl: 18px;

    /* 留白（左右邊距、區塊間距） */
    --space-6: 24px;
    --space-7: 20px;
    --space-8: 32px;
    --space-9: 48px;
  }

  /* 選單列 */
  .site-header { height: var(--m-header-height) !important; padding: 0 16px !important; }
  .site-header > span img { width: 32px !important; height: 32px !important; }
  .site-header > span span span { font-size: 17px !important; }
  .nav-mobile nav span { padding-left: 20px !important; padding-right: 20px !important; }

  /* 首頁 */
  .hero { height: var(--m-hero-height) !important; min-height: 360px; }
  .hero-rule { width: 72vw !important; }
  .home-feature,
  .home-about { grid-template-columns: 1fr !important; gap: 28px !important; }
  .home-about > div { justify-content: start !important; }
  .home-lines { grid-template-columns: 1fr !important; gap: 16px !important; }
  .home-line-label { padding-bottom: 20px !important; }
  .home-feature-text > button { justify-self: start; }       /* 「特色」的 LEARN MORE 靠左 */
  .home-lines-more { justify-content: flex-start !important; } /* 「主要販售」的 LEARN MORE 靠左 */

  /* 產品列表 */
  .products-section { padding-left: 16px !important; padding-right: 16px !important; }
  .filter-row {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 24px !important;
    scrollbar-width: none;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .product-grid {
    grid-template-columns: repeat(var(--m-product-cols), minmax(0, 1fr)) !important;
    gap: 28px 12px !important;
  }
  .product-grid > div > div:last-child > span:first-child { font-size: 15px !important; }

  /* 商品詳細頁 */
  .detail-section { padding-left: 16px !important; padding-right: 16px !important; }
  .detail-crumb { display: none !important; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 24px !important; }
  .detail-thumbs { overflow-x: auto; }
  .detail-tabs { overflow-x: auto; gap: 20px !important; scrollbar-width: none; }
  .detail-tabs button { white-space: nowrap; }

  /* 製作流程 */
  .flow-steps { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; row-gap: 24px; }
  .flow-line { display: none; }
  .flow-arrow { display: block !important; }   /* 圓圈之間的箭頭（只在手機顯示） */
  .flow-label { font-size: 14px !important; }
  .step-row { grid-template-columns: 1fr !important; gap: 2px !important; }

  /* 品牌故事 */
  .story-hero { aspect-ratio: 4 / 3 !important; }
  .tl-stop { grid-template-columns: 26px 1px minmax(0, 1fr) !important; column-gap: 12px !important; }
  .tl-num { font-size: 14px !important; }
  .tl-imgs { flex-wrap: wrap; }
  .tl-img { height: var(--m-timeline-img-height) !important; max-width: calc(50% - 4px) !important; }

  /* 合作與媒體 */
  .partners-grid { grid-template-columns: repeat(var(--m-partner-cols), minmax(0, 1fr)) !important; gap: 32px 16px !important; }
  .consign-grid,
  .upcoming-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .expo-grid { grid-template-columns: repeat(var(--m-expo-cols), minmax(0, 1fr)) !important; }
  .media-row { grid-template-columns: 28px minmax(0, 1fr) auto !important; gap: 12px !important; }

  /* 頁尾 */
  .site-footer { padding: 40px 20px 24px !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 20px !important; padding: 40px 0 28px !important; }
  .footer-tagline { padding-top: 0 !important; }
}
