/*
Theme Name: 電商套版網站 (Ecommerce Base)
Theme URI:
Author:
Description: 可重用的 WooCommerce 電商佈景主題基底（通用空白版）。單頁式自訂結帳、會員中心、金物流整合、社群登入等模組化功能，複製後改品牌內容即可上線。
Version: 1.3.1
Requires Plugins: woocommerce
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ecommerce-base
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ========================================
   CSS Variables / Design Tokens
   ======================================== */
:root {
  /* 這裡刻意不定義任何 --color-*。全站顏色只有一個來源：
     assets/css/color-tokens.css（由 functions.php 排在本檔之前載入）。

     先前這裡又寫了一次 --color-primary / secondary / accent / cream，
     與 color-tokens.css 的同名定義靠載入順序決勝負 —— 改了其中一份沒改
     另一份就會不一致，是換色時最容易漏的地方。 */

  --font-primary: "Noto Sans TC", sans-serif;
  --font-serif: "Noto Serif TC", serif;
  --font-script: "Parisienne", cursive;
  --max-width: 1200px;
  --header-height: 80px;
  /* 手機版「交易流程頁」內容離螢幕左右邊緣的距離（購物車、結帳）。
     兩頁是同一段流程，間距不一致會很明顯 —— 改這一行兩頁一起變。 */
  --mobile-gutter: 28px;
  /* 登入後前台上方的 WordPress 管理列高度。未登入時為 0，
     由下面的 body.admin-bar 覆寫。 */
  --admin-bar-height: 0px;
}

/* WordPress 管理列（登入後前台上方那條）是 position:fixed，同時會加
   html{margin-top:32px} 把整份文件往下推。本主題的 header 也是 fixed —— 
   fixed 不受 html 的 margin 影響，所以 header 會貼在視窗最上緣被管理列蓋住，
   而下方內容早已被推下 32px，兩者之間就空出一條白。
   用一個變數統一補償，所有貼齊視窗上緣的固定元素都跟著移。 */
body.admin-bar {
  --admin-bar-height: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --admin-bar-height: 46px;
  }
}

/* 600px 以下管理列改成 position:absolute，會跟著頁面捲走。
   固定元素若還留著那段高度，捲動之後頂端就會空一條白。 */
@media screen and (max-width: 600px) {
  body.admin-bar {
    --admin-bar-height: 0px;
  }
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

.price ins,
.price ins .amount,
.price ins bdi,
ins .woocommerce-Price-amount,
ins bdi {
  color: var(--color-danger);
  text-decoration: none;
}

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  position: fixed;
  top: var(--admin-bar-height);
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-header-bg);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}

/* Logo 置中
   space-between 只是把剩餘空間平均分配到項目「之間」，
   左側選單與右側功能列寬度不同時，中間的 Logo 就不會在正中央
   （實測偏了約 75px）。改成左右兩欄等寬、Logo 不伸縮，才會真正置中。 */
.header-inner > .header-nav,
.header-inner > .header-mobile-tools {
  flex: 1 1 0;
  min-width: 0;
}

.header-inner > .header-mobile-tools {
  display: flex;
  justify-content: flex-end;
}

.header-inner > .header-logo {
  flex: 0 0 auto;
  justify-content: center;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  color: var(--color-header-text);
  font-size: 16px;
  font-weight: 400;
  position: relative;
  padding-bottom: 6px;
}

.header-nav a.active,
.header-nav a:hover {
  color: var(--color-header-link-hover);
  font-weight: 700;
}

.header-nav a.active::after,
.header-nav a:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-header-underline);
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 54px;
  width: auto;
}

/* 尚未上傳 logo 時的後備：顯示網站名稱，不要掛一張佔位圖 */
.header-logo .logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 54px;
  color: var(--color-text-strong);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.header-action-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-header-text);
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.header-action-item:hover {
  opacity: 0.8;
}

.header-cart-link {
  position: relative;
}

.header-cart-mobile-icon {
  display: none;
}

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

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

.header-action-item img {
  width: 12px;
  height: 12px;
}

.header-action-item .search-icon {
  width: 10px;
  height: 12px;
}

.mobile-menu-toggle {
  display: none;
}

.header-mobile-tools {
  display: contents;
}

.mobile-only-link {
  display: none;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ========================================
   Search Overlay
   ======================================== */
body.search-overlay-open {
  overflow: hidden;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--header-height) + var(--admin-bar-height) + 40px) 20px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.search-overlay-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--color-white);
  border-radius: 12px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(-16px);
  transition: transform 0.3s ease;
}

.search-overlay.active .search-overlay-panel {
  transform: translateY(0);
}

.search-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text-light);
  font-size: 28px;
  line-height: 1;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.search-overlay-close:hover {
  background: var(--color-bg-grey);
  color: var(--color-text);
  opacity: 1;
}

.search-overlay-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-secondary-deep);
  margin-bottom: 20px;
  padding-right: 36px;
}

.search-overlay-form {
  display: flex;
  gap: 12px;
}

.search-overlay-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-overlay-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.search-overlay-input::placeholder {
  color: var(--color-text-light);
}

.search-overlay-submit {
  flex-shrink: 0;
  height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  transition:
    background 0.2s ease,
    opacity 0.2s ease;
}

.search-overlay-submit:hover {
  background: var(--color-primary-dark);
  opacity: 1;
}

@media (max-width: 768px) {
  .search-overlay {
    padding: calc(var(--header-height) + 20px) 16px 20px;
  }

  .search-overlay-panel {
    padding: 28px 20px 20px;
  }

  .search-overlay-title {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .search-overlay-form {
    flex-direction: column;
  }

  .search-overlay-submit {
    width: 100%;
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: var(--header-height);
  overflow: hidden;
}

.hero-section-mobile {
  display: none;
}

.hero-mobile-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 375 / 225;
  overflow: hidden;
}

.hero-mobile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-mobile-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  padding: 0 20px 0 56px;
}

.hero-mobile-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
}

.hero-mobile-title {
  color: var(--color-white);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.hero-mobile-subtitle {
  color: var(--color-yellow);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.hero-mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 24px;
  padding: 0 16px;
  background: var(--color-white);
  color: var(--color-secondary);
  font-size: 12px;
  font-weight: 700;
  border-radius: 0;
  transition: opacity 0.3s ease;
}

.hero-mobile-cta:hover {
  opacity: 0.85;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  /* 基準即為放大狀態，避免首次滾動時 scale 由 1 瞬跳到 1.05 造成「彈一下」 */
  transform: scale(1.05);
  transform-origin: center center;
  will-change: transform;
}

.hero-container {
  position: absolute;
  inset: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-content {
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 38px;
  text-align: center;
}

.hero-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-shadow: 0px 4px 2px rgba(0, 0, 0, 0.25);
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
}

.hero-subtitle {
  /* Hero 大標下方的英文字。用品牌黃，與頁首選單底線同一個色。
     不是漸層終點 —— 漸層是另一組更飽和的顏色。 */
  color: var(--color-yellow);
  font-size: 20px;
  font-weight: 400;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 45px;
  background: var(--color-white);
  border: 1px solid var(--color-white);
  color: var(--color-secondary);
  font-size: 16px;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.hero-cta:hover {
  background: var(--color-white);
  color: var(--color-secondary);
  opacity: 0.85;
}

/* ========================================
   Section Common Styles
   ======================================== */
.section-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}

.section-title {
  font-size: 24px;
  font-weight: 400;
  color: var(--color-text);
  text-align: center;
}

.section-title .gold {
  color: var(--color-accent);
  font-weight: 600;
}

/* Figma 匯出的 SVG 用 --stroke-0 / --fill-0 當顏色開關。
   行內 <svg> 看得到頁面的 CSS 變數，指向品牌色就會跟著變；
   用 <img> 載入的看不到（那些裝飾線已改成 CSS 直接畫）。 */
/* 標記裡寫死顏色的 SVG 已改成 currentColor，這裡給它們該有的顏色。
   裝飾線與圖示走點綴色，其餘沿用所在文字的顏色。 */
[class*="underline"] svg,
[class*="divider"] svg,
svg[class*="underline"],
svg[class*="divider"] {
  color: var(--color-accent);
}

.section-underline,
.section-title-underline,
[class*="underline"] svg,
[class*="divider"] svg,
svg[class*="underline"],
svg[class*="divider"] {
  --stroke-0: var(--color-accent);
  --fill-0: var(--color-accent);
}

.section-underline {
  width: 200px;
  height: 2px;
  background: var(--color-accent);
}

.section-title-underline {
  display: flex;
  justify-content: center;
}

/* 裝飾線改由 CSS 畫。原本是寫死顏色的直線 SVG，而且用 <img> 載入 ——
   <img> 裡的 SVG 看不到頁面的 CSS 變數，所以顏色在任何地方都改不到。
   直線本來就不需要圖檔，改成背景色之後跟著品牌色走，也少 8 個請求。 */
.section-title-underline::after {
  content: "";
  background: var(--color-accent);
  width: 200px;
  /* 設計稿 .vector-icon4：2px */
  height: 2px;
  object-fit: fill;
  display: block;
}

/* ========================================
   New Arrivals Section
   ======================================== */
.new-arrivals {
  padding: 80px 0 60px;
  background: var(--color-white);
  position: relative;
}

.new-arrivals .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 50px;
  position: relative;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: var(--color-bg-grey);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.product-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-pink);
  color: var(--color-text);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 5px;
  width: 60px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-name {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-strong);
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  color: var(--color-primary-deep);
  font-family: Arial, sans-serif;
}

.product-price ins,
.product-price ins .amount,
.product-price ins bdi,
.top5-price ins,
.top5-price ins .amount,
.top5-price ins bdi {
  color: var(--color-danger);
  text-decoration: none;
}

.product-icon {
  width: 14px;
  height: 12px;
  cursor: pointer;
  transition:
    transform 0.3s,
    fill 0.3s,
    stroke 0.3s;
}

.product-icon:hover {
  transform: scale(1.2);
}

.product-icon.heart-icon path {
  stroke: var(--color-pink);
  stroke-width: 1.5;
  fill: none;
  transition: fill 0.3s;
}

.product-icon.heart-icon.active path,
.product-icon.heart-icon:hover path {
  fill: var(--color-pink);
}

.product-icon.bag {
  width: 17px;
  height: 17px;
}

.product-icon.bag path {
  fill: var(--color-primary-deep);
  transition: opacity 0.3s;
}

.product-icon.bag:hover path {
  opacity: 0.8;
}

.nav-arrow {
  position: absolute;
  top: 245px;
  transform: translateY(-50%);
  font-size: 40px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  transition:
    color 0.3s,
    transform 0.3s;
  z-index: 5;
  background: none;
  border: none;
  line-height: 1;
  font-family: monospace, sans-serif;
}

.nav-arrow.left {
  display: none !important;
}

/* 推薦商品固定為 4 欄一列（最多 4 件），桌機沒有可切換的分頁，隱藏無作用的箭頭 */
.nav-arrow.right {
  display: none !important;
  right: 15px;
  color: var(--color-black);
}

.nav-arrow.right:hover {
  color: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

.products-carousel-dots {
  display: none;
}

.products-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-soft);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.products-carousel-dot.active {
  background: var(--color-primary);
  transform: scale(1.25);
}

/* ========================================
   Categories Section
   ======================================== */
.categories-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 600px;
  gap: 0;
}

.category-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.category-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-accessories {
  margin-top: -1px;
}

.category-women {
  grid-row: 1 / 3;
}

.category-women .category-overlay {
  gap: 7px;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.category-women .category-title {
  font-size: 32px;
  line-height: 1.25;
}

.category-women .category-subtitle {
  font-size: 16px;
  line-height: 1.4;
  margin-top: 0;
}

.category-women .category-btn {
  width: 118px;
  height: 44px;
  margin-top: 24px;
  font-size: 16px;
  font-weight: 600;
}

.category-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.category-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-white);
  text-align: center;
}

.category-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  text-align: center;
  margin-top: 4px;
  /* 限制在卡片內。沒有這個上限時，長副標會橫跨整個區塊寬度，
     斷行落在奇怪的位置（例如只剩「選。」單獨一行）。
     後台的副標欄位是 textarea，要精準控制斷點就直接打 Enter。 */
  max-width: min(560px, 78%);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.category-men .category-title,
.category-accessories .category-title {
  font-size: 24px;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.category-men .category-subtitle,
.category-accessories .category-subtitle {
  font-size: 12px;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.category-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 36px;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  font-size: 14px;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: var(--color-white);
  color: var(--color-text-strong);
  opacity: 1;
}

.category-women-mobile {
  display: none;
}

.category-women-mobile-bg {
  position: absolute;
  width: 146.32%;
  height: 130.67%;
  left: -31.45%;
  top: -30.67%;
  max-width: none;
  object-fit: cover;
}

.category-women-mobile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.category-women-mobile-content {
  z-index: 2;
  gap: 16px;
}

.category-women-mobile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 313px;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.category-women-mobile-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
}

.category-women-mobile-subtitle {
  font-size: 13px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
  margin-top: 0;
}

.category-women-mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 24px;
  padding: 6px 22px;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 600;
  line-height: 22px;
  margin-top: 0;
}

.category-men-mobile {
  display: none;
}

.category-men-mobile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-men-mobile-content {
  z-index: 2;
}

.category-men-mobile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.4);
}

.category-men-mobile-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
}

.category-men-mobile-subtitle {
  font-size: 13px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
  margin-top: 0;
  white-space: nowrap;
}

.category-accessories-mobile {
  display: none;
}

.category-accessories-mobile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-accessories-mobile-content {
  z-index: 2;
}

.category-accessories-mobile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 273px;
  max-width: calc(100% - 40px);
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.category-accessories-mobile-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
}

.category-accessories-mobile-subtitle {
  font-size: 13px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
  margin-top: 0;
}

/* ========================================
   Top 5 Section
   ======================================== */
.top5-section {
  padding: 56px 0 65px;
  background-color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.top5-section::before {
  content: "";
  position: absolute;
  /* 靠左靠下對齊。原本是靠上（top: 0 + background-position: left top）。
     兩個都要改：容器要貼到區塊底部，圖在容器內也要貼底，
     只改一個的話圖會停在容器上緣、看起來仍然偏上。 */
  top: auto;
  bottom: 0;
  left: -146px;
  width: 611px;
  height: 100%;
  /* 左側裝飾圖。原本寫死 placeholder.svg，前台就一直掛著一個淡淡的
     佔位輪廓，而且沒有任何地方可以換掉。改由自訂器帶入 --top5-decor，
     沒設定就是 none —— 不顯示，而不是顯示佔位圖。 */
  background-image: var(--top5-decor, none);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 611px auto;
  transform: none;
  z-index: 0;
  pointer-events: none;
}

.top5-section .container {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 60px;
}

.top5-section .section-title-wrap {
  margin-bottom: 26px;
}

.top5-section .section-title {
  color: var(--color-text-strong);
}

.top5-section .section-title .gold {
  color: var(--color-primary);
}

.top5-section .section-underline {
  width: 151px;
  height: 2px;
  background: var(--color-accent);
  object-fit: cover;
  opacity: 1;
  padding: 0;
  /* 這裡原本有一段 filter: invert/sepia/hue-rotate 的色相濾鏡，把背景的
     品牌色硬轉成舊的橘色（#e26725）。品牌色怎麼改都沒用 —— 濾鏡在最後
     覆蓋掉結果。裝飾線直接用代號上色即可，不需要濾鏡。 */
}

.top5-grid {
  display: flex;
  gap: 42px;
  justify-content: center;
  align-items: flex-start;
}

.top5-card {
  position: relative;
  display: block;
  width: 200px;
  padding: 50px 20px 19px;
  /* 底色是後備：沒上傳背景圖時就是純深色。
     --top5-card-bg 由 front-page.php 依自訂器的「卡片背景圖」帶入。 */
  background-color: var(--color-secondary);
  background-image: var(--top5-card-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
  transition: transform 0.3s;
}

.top5-card-body {
  display: block;
}

.top5-info {
  display: block;
}

.top5-card:hover {
  transform: translateY(-5px);
  opacity: 1;
}

.top5-image-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: transparent;
  border: none;
}

.top5-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: static;
}

.top5-rank {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 700;
  z-index: 2;
}

.top5-rank.rank-1 {
  background: var(--color-primary);
}

.top5-rank.rank-2 {
  background: var(--color-pink);
}

/* 3~5 名同一階灰。原本是 #888 / #adadad / #d9d9d9 三個不同的灰，
   並排時看起來像沒對齊的漸淡，設計稿上是同一個灰。 */
.top5-rank.rank-3,
.top5-rank.rank-4,
.top5-rank.rank-5 {
  background: var(--color-grey);
}

.top5-name {
  font-size: 13px;
  margin-left: -8px;
  font-weight: 400;
  line-height: 1.4;
  /* 商品名用品牌黃，與價格的白拉開層次 */
  color: var(--color-yellow);
  margin-top: 10px;
  padding: 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 英文品名：接在中文後面，同一行。留一點字距讓中英不黏在一起。 */
.top5-name-en {
  margin-left: 1px;
  font-weight: 400;
}

.top5-price {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-white);
  margin-top: 2px;
  padding: 0;
  white-space: nowrap;
}

.top5-mobile-banner {
  display: none;
}

.top5-mobile-banner-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 375 / 192;
  object-fit: cover;
}

/* ========================================
   Sustainability Section
   ======================================== */
.sustainability-section {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 917fr 1003fr;
  height: 305px;
}

.sustainability-image {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.sustainability-image img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.sustainability-content {
  background: var(--color-bg-grey);
  padding: clamp(20px, 2.2vw, 34px) clamp(36px, 7vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.sustainability-label {
  font-size: 12px;
  color: var(--color-yellow);
  margin-bottom: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sustainability-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  /* 這一區的底是深色情境圖，字必須是淺色。
     原本是 --color-text-strong（#333）壓在深色底上，幾乎看不見。 */
  color: var(--color-pink);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

.sustainability-text {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-white);
  line-height: normal;
  margin-bottom: 12px;
  max-width: 480px;
}

.sustainability-text p + p {
  margin-top: 0.35em;
}

.sustainability-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 44px;
  padding: 0 24px;
  /* 白底深字，與深色情境圖對比最強（設計稿即為此） */
  border: 1px solid var(--color-white);
  background: var(--color-white);
  color: var(--color-text);
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.sustainability-btn:hover {
  background: transparent;
  color: var(--color-white);
  opacity: 1;
}

/* ========================================
   Urban Outfit Section
   ======================================== */
.urban-outfit {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--color-text);
}

.urban-outfit-bg {
  position: relative;
  z-index: 0;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   情境圖：標題與浮動商品標籤
   設計稿畫布 1920 × 550。以下所有數值都直接對應設計稿的 px：
     位置用 %（設計px / 1920 或 / 550），縮放時構圖比例不變
     字級與尺寸用 clamp(下限, 設計px/1920*100 vw, 設計px)
       → 視窗 ≥1920 時等於設計稿數值，變窄時等比縮小
   ══════════════════════════════════════════════════════════════ */

/* 區塊高度跟著寬度等比縮放（550/1920 = 28.6458%），
   否則視窗變窄時圖被裁掉、標籤的 % 座標就對不上構圖了。 */
.urban-outfit-bg img {
  height: clamp(420px, 28.6458vw, 550px);
  object-fit: cover;
  object-position: center;
  width: 100%;
  max-width: 100%;
  display: block;
}

.urban-headline {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.urban-headline-cn {
  /* 設計稿 64px。字距與行高都不指定 —— 設計稿的 .div / .b 沒有設，
     多給 letter-spacing 會讓整行變寬，右側那行的左緣就對不上了。 */
  font-size: clamp(30px, 3.3333vw, 64px);
  font-weight: 300;
  line-height: normal;
  color: var(--color-white);
  text-shadow: 0 4px 4px color-mix(in srgb, var(--color-black) 25%, transparent);
  white-space: nowrap;
}

.urban-headline-script {
  font-family: var(--font-script);
  font-weight: 400;
  /* 行高交給字型本身（設計稿未指定）。這會決定下一行往上收 21px 的起算點，
     寫死 1.1 的話「日常配戴靈感」會比設計稿高出約 28px。 */
  line-height: normal;
  color: var(--color-yellow);
  white-space: nowrap;
}

/* ── 左側：中文與手寫體各自定位（設計稿上兩者並未切齊）── */
.urban-headline-cn--left {
  position: absolute;
  left: 32.7604%; /* 設計稿 629 / 1920 */
  top: 25.2727%; /* 設計稿 139 / 550  */
}

.urban-headline-script--left {
  position: absolute;
  left: 20.8854%; /* 設計稿 401 / 1920 */
  top: 40.7273%; /* 設計稿 224 / 550  */
  /* 設計稿 90px */
  font-size: clamp(40px, 4.6875vw, 90px);
}

/* ── 右側：手寫體在上、中文在下，兩行左緣切齊 ── */
.urban-headline-group--right {
  position: absolute;
  left: 51.9271%; /* 設計稿 997 / 1920 */
  top: 31.6364%; /* 設計稿 174 / 550  */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.urban-headline-group--right .urban-headline-script {
  /* 設計稿 96px */
  font-size: clamp(42px, 5vw, 96px);
  /* 設計稿把下一行往上收 21px。用 em 綁在 96px 上（-21/96），
     字級縮放時這個重疊量才會跟著等比縮，不會在小視窗黏成一團。 */
  margin-bottom: -0.21875em;
}

/* ── 浮動商品標籤 ──
   位置用百分比定位在圖片上，圖片縮放時標籤跟著跑，不會脫離對應的商品。
   JS 只負責收合／展開（見 main.js 的 Urban Outfit Tag Toggle）。 */
.urban-tag {
  position: absolute;
  display: flex;
  align-items: center;
  /* 設計稿 .frame-parent gap: 7px */
  gap: clamp(5px, 0.3646vw, 7px);
  z-index: 2;
}

/* 靠右側的標籤把＋鈕放左邊，資訊往左展開，否則會被畫面右緣切掉。
   設計稿也是這樣：左半部兩個標籤＋在右，右半部兩個＋在左。 */
.urban-tag--left {
  flex-direction: row-reverse;
}

.urban-tag-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* 設計稿 .group2 154 × 60、.group-inner border-radius 10px */
  width: clamp(124px, 8.0208vw, 154px);
  height: clamp(48px, 3.125vw, 60px);
  gap: clamp(1px, 0.1042vw, 2px);
  border: 1px solid var(--color-white);
  border-radius: clamp(8px, 0.5208vw, 10px);
  color: var(--color-white);
  line-height: 1.35;
  text-align: center;
  pointer-events: auto;
}

.urban-tag-name {
  /* 設計稿 13px。原本 700 壓在情境圖上太厚重，改成 500 —— 仍比下方價格重，但字形細一些 */
  font-size: clamp(11px, 0.6771vw, 13px);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.urban-tag-price {
  /* 設計稿 12px */
  font-size: clamp(10px, 0.625vw, 12px);
}

/* 特價：WooCommerce 的 get_price_html() 會輸出 <del>原價</del><ins>特價</ins>，
   預設樣式是紅字底線，壓在深色情境圖上又髒又不搭。
   原價改成半透明白，特價用品牌黃。 */
.urban-tag-price del,
.urban-tag-price del .amount,
.urban-tag-price del bdi {
  color: color-mix(in srgb, var(--color-white) 60%, transparent);
  text-decoration: line-through;
}

.urban-tag-price ins,
.urban-tag-price ins .amount,
.urban-tag-price ins bdi {
  color: var(--color-yellow);
  text-decoration: none;
  font-weight: 700;
}

/* WooCommerce 會塞一段給螢幕閱讀器的「原始價格：…」文字，
   視覺上不需要，但要留給輔助技術讀。 */
.urban-tag-price .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.urban-tag-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* 設計稿 .container 30 × 30、圓形、1px 白框 */
  width: clamp(24px, 1.5625vw, 30px);
  height: clamp(24px, 1.5625vw, 30px);
  padding: 0;
  border: 1px solid var(--color-white);
  border-radius: 100px;
  background: transparent;
  color: var(--color-white);
  /* 設計稿 18px、粗體 */
  font-size: clamp(14px, 0.9375vw, 18px);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
  pointer-events: auto;
}

.urban-tag-btn:hover {
  background: color-mix(in srgb, var(--color-white) 30%, transparent);
  transform: scale(1.08);
}

/* 手機版尺寸覆寫。原本這一段是給桌機那個（已隱藏的）區塊用的死規則，
   數值也跟手機設計稿對不上。現在手機標籤真的會套到這裡。
   設計稿手機值：框線 0.86px、圓角 8.64px、品名 12px、價格 10px、＋鈕 26px。 */
@media (max-width: 768px) {
  .urban-tag-info {
    /* 手機改為依內容撐開，不用桌機那組固定寬高 */
    width: auto;
    height: auto;
    padding: 8px 10px;
    border-width: 0.86px;
    border-radius: 8.64px;
  }

  .urban-tag-name {
    font-size: 12px;
  }

  .urban-tag-price {
    font-size: 10px;
  }

  .urban-tag-btn {
    width: 26px;
    height: 26px;
    border-width: 0.86px;
    font-size: 16px;
  }
}

.urban-outfit-mobile {
  display: none;
}

.urban-outfit-mobile-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 375 / 279;
  overflow: hidden;
}

.urban-outfit-mobile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.urban-outfit-mobile-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.urban-outfit-mobile-headline {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* 座標以設計稿手機畫布 375 × 280 換算成百分比。
   左側中文與手寫體刻意錯開（手寫體更靠左），與桌機同一種構圖。 */
.urban-outfit-mobile-headline-cn {
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-white);
  white-space: nowrap;
}

.urban-outfit-mobile-headline-script {
  font-family: var(--font-script);
  font-size: 20px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-yellow);
  /* 不換行：容器原本是固定 25% 寬，"Crystal bracelet" 會被折成兩行 */
  white-space: nowrap;
}

.urban-outfit-mobile-headline-cn--left {
  position: absolute;
  left: 35.47%; /* 設計稿 133 / 375 */
  top: 8.57%; /* 設計稿 24 / 280  */
}

.urban-outfit-mobile-headline-script--left {
  position: absolute;
  left: 17.6%; /* 設計稿 66 / 375 */
  top: 13.57%; /* 設計稿 38 / 280 */
}

.urban-outfit-mobile-headline-right {
  position: absolute;
  left: 52.8%; /* 設計稿 198 / 375 */
  top: 21.07%; /* 設計稿 59 / 280  */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* 手機版標籤 —— 只覆寫位置與尺寸，其餘（邊框、顏色、＋鈕行為）
   完全沿用桌機的 .urban-tag / .urban-tag-info / .urban-tag-btn。
   座標為設計稿手機畫布 375 × 280 的百分比。 */
.urban-tag--mobile-1 {
  top: 35.13%;
  left: 9.87%;
}

.urban-tag--mobile-2 {
  top: 64.87%;
  left: 46.13%;
}

/* ========================================
   Instagram Section
   ======================================== */
.instagram-section {
  padding: 80px 0;
  text-align: center;
}

.instagram-handle {
  font-size: 20px;
  color: var(--color-text);
  margin-bottom: 8px;
}

.instagram-desc {
  font-size: 15px;
  color: var(--color-text-light);
  margin-bottom: 40px;
}

.instagram-grid {
  display: flex;
  justify-content: center;
  gap: 26px;
}

.instagram-item {
  width: 200px;
  height: 200px;
  overflow: hidden;
  cursor: default;
}

.instagram-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.instagram-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.instagram-item:hover img {
  transform: scale(1.1);
}

.instagram-carousel-dots {
  display: none;
}

.instagram-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-soft);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.instagram-carousel-dot.active {
  background: var(--color-primary);
  transform: scale(1.25);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  position: relative;
}

/* 舊頁尾純文字版訂閱區（.footer-newsletter / .newsletter-*）的樣式已移除。
   全站改用 template-parts/newsletter.php 的照片版，樣式在 .about-subscribe 那一段。 */

/* Footer Links */
.footer-divider {
  width: 100%;
  max-width: 1000px;
  height: 1px;
  background: var(--color-footer-text);
  opacity: 0.8;
  margin: 0 auto;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 100px;
}

.footer-links {
  display: contents;
}

.footer-social-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-footer-text);
  margin-bottom: 16px;
}

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

.footer-col ul,
.footer-col .menu {
  list-style: none;
}

.footer-col ul li a,
.footer-col .menu li a {
  font-size: 14px;
  color: color-mix(in srgb, var(--color-footer-text) 80%, transparent);
  transition:
    color 0.3s,
    opacity 0.3s;
}

.footer-col ul li a:hover,
.footer-col .menu li a:hover {
  color: var(--color-footer-text);
  opacity: 1;
}

.footer-social {
  display: flex;
  gap: 17px;
  align-items: center;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social img {
  width: 28px;
  height: 27px;
}

/* Footer Bottom */
.footer-bottom-links {
  display: flex;
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 100px;
}

.footer-bottom-links a,
.footer-bottom-links .footer-legal-advisor {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-footer-text) 80%, transparent);
}

.footer-bottom-links a:hover,
.footer-bottom-links .footer-legal-advisor.is-clickable:hover,
.footer-bottom-links .footer-legal-advisor.is-clickable:focus-visible {
  color: var(--color-footer-text);
  opacity: 1;
  outline: none;
}

/* ── 法律顧問（政策列最右邊）── */

/* 把 <button> 的預設外觀歸零，看起來跟旁邊的連結一樣。
   字級與顏色不寫在這裡 —— 跟政策連結共用同一組宣告，
   否則兩邊各寫一份，改了其中一邊就會對不上（實測真的發生過）。 */
.footer-legal-advisor {
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  line-height: inherit;
}

/* 可點擊。不加底線（依需求），
   改用指標與 hover 變色當作「這可以點」的提示。 */
.footer-legal-advisor.is-clickable {
  cursor: pointer;
  text-decoration: none;
}

/* ── 證書彈窗 ── */

/*
 * [hidden] 是瀏覽器內建樣式，優先權比下面的 display: flex 低。
 * 沒有這一條，關閉時整層仍會鋪滿畫面把頁尾點擊全部吃掉。
 */
.footer-cert-modal[hidden] {
  display: none;
}

.footer-cert-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  /* 透明不等於穿透，淡出期間也不要擋住底下 */
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.footer-cert-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.footer-cert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.footer-cert-box {
  position: relative;
  max-width: min(90vw, 720px);
  max-height: 88vh;
}

.footer-cert-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  background: var(--color-white);
}

.footer-cert-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-white);
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* 彈窗開啟時背景不跟著滾動 */
body.footer-cert-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .footer-cert-close {
    top: -12px;
    right: -6px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-cert-modal {
    transition: none;
  }
}

.footer-copyright {
  background: var(--color-soft);
  text-align: center;
  padding: 16px 0;
  /* 桌機：一列並排不換行；窄螢幕才自動換行 */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 6px;
  row-gap: 4px;
}

.footer-copyright-line,
.footer-copyright-design {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-secondary);
  margin: 0;
}

.footer-copyright-design::before {
  content: "｜";
  margin-right: 6px;
  color: var(--color-text-muted);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
/* 只淡入 ::before 裝飾層，元素本體不位移也不透明化。
   .animate-on-scroll 會連整塊內容一起淡入，用在只想讓背景裝飾浮現時太重。 */
.animate-decor::before {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.animate-decor.animated::before {
  opacity: 1;
  /* 延遲一點再浮現，讓主要內容先進場 */
  transition-delay: 0.35s;
}

.animate-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.animate-stagger.animated > *:nth-child(1) {
  transition-delay: 0s;
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger.animated > *:nth-child(2) {
  transition-delay: 0.1s;
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger.animated > *:nth-child(3) {
  transition-delay: 0.2s;
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger.animated > *:nth-child(4) {
  transition-delay: 0.3s;
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger.animated > *:nth-child(5) {
  transition-delay: 0.4s;
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .categories-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .category-women {
    grid-row: auto;
    min-height: 400px;
  }

  .category-men,
  .category-accessories {
    min-height: 300px;
  }

  .top5-grid {
    flex-wrap: wrap;
  }

  .urban-text-group.group-left {
    left: 3%;
    top: 6%;
  }

  .urban-text-group.group-right {
    right: 2%;
    bottom: 4%;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  /* Header UI */
  .site-header {
    overflow: hidden;
  }

  .header-inner {
    padding: 0 16px;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 0;
    align-items: center;
    column-gap: 8px;
  }

  .header-mobile-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    width: auto;
    max-width: none;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    flex-shrink: 0;
    z-index: 2;
    overflow: visible;
  }

  .header-logo {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    z-index: 1;
    min-width: 0;
    max-width: 226px;
    justify-self: center;
    grid-column: 2;
    grid-row: 1;
    pointer-events: auto;
  }

  .header-logo a,
  .header-logo .custom-logo-link {
    display: inline-flex;
  }

  .header-logo img {
    width: auto !important;
    height: auto !important;
    max-height: 36px;
    max-width: 150px;
    object-fit: contain;
  }

  .header-logo .logo-text {
    font-size: 17px;
    line-height: 36px;
  }

  .header-action-item > span:not(.header-cart-count) {
    display: none;
  }

  .header-cart-count {
    display: block;
    top: 2px;
    right: -2px;
    min-width: 15px;
    height: 15px;
    font-size: 9px;
    line-height: 15px;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    z-index: 2;
    margin-right: 0;
  }

  .header-actions
    .header-action-item:not(#search-toggle):not(.header-cart-link) {
    display: none !important;
  }

  .header-cart-link {
    display: flex !important;
  }

  .header-cart-link > img {
    display: none;
  }

  /* 線條顏色跟著頁首文字色走。原本 SVG 裡寫死 stroke="black"，
     黑底黑線 —— 圖示等於不存在。改成 currentColor 之後，
     頁首改成淺色底時圖示也會跟著變深。 */
  .header-cart-mobile-icon {
    display: block;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--color-header-text);
  }

  .header-action-item {
    min-width: 32px;
    min-height: 32px;
    justify-content: center;
    padding: 4px;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .header-action-item .search-icon {
    width: 15px !important;
    height: 15px !important;
    object-fit: contain;
    aspect-ratio: 10.108 / 11.5394;
    flex-shrink: 0;
  }

  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 32px;
    padding: 7px 4px;
    box-sizing: border-box;
    z-index: 2;
    flex-shrink: 0;
    overflow: visible;
  }

  .hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    flex: 0 0 2px;
    background-color: var(--color-header-text) !important;
    transition: all 0.3s ease;
  }

  .mobile-menu-toggle.active .hamburger-line {
    background-color: var(--color-primary) !important;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .header-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(var(--header-height) + var(--admin-bar-height));
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height) - var(--admin-bar-height));
    background: var(--color-header-bg);
    padding: 40px 20px;
    gap: 25px;
    transition: left 0.3s ease;
    z-index: 999;
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 0;
    overflow: visible;
  }

  .header-nav.active {
    left: 0;
  }

  .header-nav .mobile-only-link {
    display: block;
  }

  .header-nav a {
    color: var(--color-header-text);
  }

  .header-nav a.active,
  .header-nav a:hover {
    color: var(--color-header-link-hover);
    font-weight: 700;
  }

  .header-nav a::after {
    display: none !important;
  }

  /* Hero UI */
  .hero-section {
    display: none !important;
  }

  .hero-section-mobile {
    display: block;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: var(--header-height);
    overflow: hidden;
  }

  .hero-mobile-inner {
    aspect-ratio: 375 / 225;
  }

  .hero-mobile-title {
    font-size: 20px;
  }

  .hero-mobile-subtitle {
    font-size: 12px;
  }

  .hero-mobile-cta {
    height: 24px;
    font-size: 12px;
    border-radius: 0;
  }

  /* Footer UI */
  .site-footer {
    --footer-mobile-gutter: 35px;
    display: grid;
    /* 訂閱區下方那條分隔線已移除，divider-top 這一列跟著拿掉 */
    grid-template-areas:
      "newsletter"
      "links"
      "divider-nav"
      "social"
      "legal"
      "copyright";
  }

  /* 訂閱區塊改成獨立的 <section>，不再是 .footer-newsletter 那個 <div>，
     這裡明確指定格線位置，不靠自動排版碰運氣。 */
  .site-footer > .about-subscribe {
    grid-area: newsletter;
  }

  .site-footer > .footer-divider {
    width: calc(100% - (var(--footer-mobile-gutter) * 2));
    max-width: none;
    margin-inline: auto;
    opacity: 1;
  }

  /* 原本是 .footer-divider:nth-of-type(2) / (4)。
     :nth-of-type 數的是同類型元素（div）的序號，不是同 class ——
     訂閱區從 <div> 換成 <section>、又移除一條分隔線之後，
     兩條規則都會對不到任何元素。改用明確 class。 */
  .site-footer > .footer-divider--nav {
    grid-area: divider-nav;
  }

  .footer-main {
    display: contents;
  }

  /* 「內容靠左、整體置中」：
     整組用 fit-content 收成「最寬那一欄」的寬度，再 margin auto 擺到中間；
     三欄 stretch 到同一寬度，左緣自然對齊在同一條直線上。

     先前是 align-items: center + .footer-col{margin-inline:auto}，
     那是「每一欄各自置中」—— 欄寬不同，標題就會呈階梯狀（71 / 90 / 127）。 */
  .footer-links {
    grid-area: links;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    padding: 24px var(--footer-mobile-gutter) 20px;
    text-align: left;
  }

  .footer-col-title {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
  }

  .footer-col ul,
  .footer-col .menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: auto;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .footer-col ul li,
  .footer-col .menu li {
    margin-bottom: 0;
    min-width: 0;
  }

  .footer-col ul li a,
  .footer-col .menu li a {
    display: block;
    color: var(--color-footer-text);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 1;
    white-space: nowrap;
  }

  /* Follow Us 與圖示整組置中（原本是靠右） */
  .footer-social-row {
    grid-area: social;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px var(--footer-mobile-gutter) 12px;
  }

  .footer-social-row .footer-col-title {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
  }

  .footer-social {
    justify-content: center;
    gap: 12px;
  }

  .footer-social img {
    width: 28px;
    height: 27px;
  }

  .footer-bottom-links {
    grid-area: legal;
    flex-direction: row;
    justify-content: flex-end;
    gap: 16px;
    padding: 0 var(--footer-mobile-gutter) 24px;
    flex-wrap: wrap;
    max-width: none;
  }

  /*
   * 法律顧問獨佔一行並置中。
   *
   * 這一列是 justify-content: flex-end，四個政策連結塔滿第一行之後，
   * 法律顧問被擠到第二行、也跟著靠右 —— 看起來像接在后面的掉隊。
   * flex-basis: 100% 讓它一定自成一行，text-align 才有意義。
   */
  .footer-bottom-links .footer-legal-advisor {
    flex-basis: 100%;
    text-align: center;
    margin-top: 4px;
  }

  .footer-bottom-links a {
    font-size: 12px;
    color: var(--color-footer-text);
    opacity: 1;
  }

  .footer-copyright {
    grid-area: copyright;
    background: var(--color-soft);
    padding: 14px 20px 16px;
    flex-direction: column; /* 手機版堆疊換行 */
  }

  .footer-copyright-line,
  .footer-copyright-design {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-strong);
    line-height: 1.6;
  }

  .footer-copyright-design::before {
    display: none; /* 手機版換行 → 不顯示分隔線 */
  }

  /* Others */
  .top5-section {
    padding: 40px 0 50px;
  }

  /* 手機版裝飾圖靠左上（桌機是靠左下）。
     原本是 background-position: top center + cover ——
     置中會讓裝飾跑到畫面中間，cover 又會把圖裁掉。
     改成 left top + contain：整張圖完整顯示並貼齊左上角。 */
  .top5-section::before {
    display: block;
    top: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--top5-decor-mobile, var(--top5-decor, none));
    background-repeat: no-repeat;
    background-position: left top;
    background-size: contain;
  }

  .top5-section .container {
    padding: 0 35px;
  }

  .top5-section .section-title-wrap {
    margin-bottom: 20px;
    gap: 7px;
  }

  .top5-section .section-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    color: var(--color-text);
  }

  .top5-section .section-title .gold {
    color: var(--color-primary);
    font-weight: 600;
  }

  /* 同上：手機版只是線變短，不要再換成寫死顏色的圖檔。 */
  .top5-section .section-underline {
    width: 122px;
  }

  .top5-grid {
    flex-direction: column;
    align-items: center;
    gap: 22px;
    overflow: visible;
    padding: 0;
    margin: 0;
    scroll-snap-type: none;
  }

  .top5-card {
    width: 100%;
    max-width: 304px;
    height: 134px;
    padding-top: 0;
    scroll-snap-align: unset;
    background-color: var(--color-secondary);
    background-image: var(--top5-card-bg-mobile, var(--top5-card-bg, none));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
    transform: none;
  }

  .top5-card:hover {
    transform: none;
  }

  .top5-card-body {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 31px 16px 18px 18px;
  }

  .top5-image-wrap {
    width: 100px;
    height: 86px;
    border: none;
    background: transparent;
    flex-shrink: 0;
    overflow: hidden;
  }

  .top5-image-wrap img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .top5-rank {
    top: 0;
    left: 0;
    width: 25px;
    height: 25px;
    font-size: 11px;
    font-weight: 700;
    line-height: normal;
  }

  .top5-rank.rank-1 {
    background: var(--color-primary);
  }

  .top5-rank.rank-2 {
    background: var(--color-pink);
    width: 24.6px;
    height: 24.6px;
  }

  .top5-rank.rank-3 {
    background: var(--color-grey);
    width: 24.6px;
    height: 24.6px;
  }

  .top5-rank.rank-4 {
    background: var(--color-grey);
    width: 24.6px;
    height: 24.6px;
  }

  .top5-rank.rank-5 {
    background: var(--color-grey);
    width: 24.6px;
    height: 24.6px;
  }

  .top5-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }

  .top5-name {
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
    color: var(--color-yellow);
    min-height: 0;
    margin: 0;
    padding: 0;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .top5-price {
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    color: var(--color-white);
    margin: 0;
    padding: 0;
    white-space: nowrap;
  }

  .top5-price ins,
  .top5-price ins .amount,
  .top5-price ins bdi {
    color: var(--color-white);
  }

  .top5-mobile-banner {
    display: block;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
  }

  .products-grid {
    display: flex;
    grid-template-columns: unset;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    /* 由 JS 接管觸控分頁（一次滑一張）：停用原生 snap 與慣性；
       scroll-behavior:auto 讓拖曳即時跟手；touch-action:pan-y 保留垂直捲頁 */
    scroll-snap-type: none;
    scroll-behavior: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-padding: 0 20px;
    padding: 0 20px 6px;
    margin: 0;
  }

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

  .new-arrivals {
    padding: 40px 0 30px;
  }

  .new-arrivals .container {
    padding: 0;
  }

  .new-arrivals .section-title-wrap {
    margin-bottom: 24px;
    padding: 0 20px;
    gap: 6px;
  }

  .new-arrivals .section-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    color: var(--color-text);
    text-align: center;
    word-break: break-word;
  }

  /* 手機版只是線變短，沿用桌機那一條就好。
     原本是把它 display:none，改用 background:url(...svg) 畫一張圖檔 ——
     background-image 裡的 SVG 是獨立文件，讀不到頁面的 CSS 變數，
     檔案裡烤死的 #E25B2A 永遠贏，所以手機版底線顏色跟桌機對不起來。 */
  .new-arrivals .section-underline {
    width: 110.854px;
  }

  .product-card {
    flex: 0 0 158px;
    width: 158px;
    scroll-snap-align: center;
    gap: 10px;
  }

  .product-card:hover {
    transform: none;
  }

  .product-image-wrap {
    height: 180px;
  }

  .new-arrivals .product-info-row {
    gap: 6px;
    min-width: 0;
  }

  .new-arrivals .product-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(10px, 3.47vw, 13px);
    line-height: 1.3;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .new-arrivals .product-name a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
  }

  .product-price {
    font-size: 14px;
  }

  .product-icon.bag {
    width: 16px;
    height: 16px;
  }

  .nav-arrow {
    display: none !important;
  }

  .products-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 0 20px;
  }

  .products-carousel-dot,
  .instagram-carousel-dot {
    width: 6px;
    height: 6px;
  }

  .products-carousel-dot.active,
  .instagram-carousel-dot.active {
    transform: scale(1.18);
  }

  .sustainability-section {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .sustainability-image {
    display: none;
  }

  .sustainability-content {
    padding: 41px 62px;
    align-items: flex-start;
    text-align: left;
    justify-content: flex-start;
    gap: 0;
    min-height: 236px;
    background-color: var(--color-secondary);
    /* 背景圖由自訂器的「永續區・右側背景」以 inline style 帶入，
       這裡不再寫死 placeholder.svg（前台會掛一張佔位圖）。 */
    background-size: cover;
    background-position: center;
  }

  .sustainability-label,
  .sustainability-title,
  .sustainability-text {
    text-align: left;
  }

  .sustainability-label {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 400;
    color: var(--color-yellow);
    letter-spacing: 0;
    text-transform: none;
  }

  .sustainability-title {
    margin: 0 0 9px;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-pink);
    letter-spacing: 0;
    line-height: normal;
  }

  .sustainability-text {
    margin: 0 0 20px;
    font-size: 12px;
    font-weight: 400;
    color: var(--color-white);
    line-height: normal;
  }

  .sustainability-text p {
    margin: 0;
  }

  .sustainability-text .sustain-mobile-line {
    display: block;
  }

  .sustainability-text p + p {
    margin-top: 0;
  }

  .sustainability-btn {
    align-self: flex-start;
    width: 140px;
    min-width: 140px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: var(--color-white);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    letter-spacing: 0;
  }

  .sustainability-btn:hover {
    background: var(--color-white);
    color: var(--color-text);
    opacity: 0.9;
  }

  .urban-outfit {
    display: none !important;
  }

  .urban-outfit-mobile {
    display: block;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
  }

  .category-women {
    display: none !important;
  }

  .category-women-mobile {
    display: flex;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 375 / 234;
    width: 100%;
  }

  .category-men {
    display: none !important;
  }

  .category-men-mobile {
    display: flex;
    min-height: 0;
    aspect-ratio: 375 / 300;
    width: 100%;
  }

  .category-accessories {
    display: none !important;
  }

  .category-accessories-mobile {
    display: flex;
    min-height: 0;
    aspect-ratio: 375 / 300;
    width: 100%;
  }

  .instagram-section {
    padding: 40px 0 30px;
  }

  .instagram-handle {
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    color: var(--color-text);
    margin-bottom: 6px;
    padding: 0 20px;
  }

  .instagram-desc {
    font-size: 12px;
    font-weight: 400;
    line-height: normal;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    padding: 0 20px;
  }

  .instagram-carousel {
    width: 100%;
  }

  .instagram-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    /* 由 JS 接管觸控分頁（一次滑一張）：停用原生 snap 與慣性 */
    scroll-snap-type: none;
    scroll-behavior: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-padding: 0 20px;
    padding: 0 20px 6px;
    margin: 0;
  }

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

  .instagram-item {
    flex: 0 0 118px;
    width: 118px;
    height: 118px;
    scroll-snap-align: center;
  }

  .instagram-item:hover img {
    transform: none;
  }

  .instagram-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 0 20px;
  }
}

/* Narrow mobile (e.g. iPhone SE 375px) */
@media (max-width: 390px) {
  .header-inner {
    padding: 0 12px;
    column-gap: 6px;
  }
}

/* Shorter mobile viewports (e.g. iPhone SE) — compact spacing, preserve layout */
@media (max-width: 768px) and (max-height: 700px) {
  .sustainability-content {
    padding: 32px 40px;
  }

  .sustainability-title {
    font-size: 16px;
    margin-bottom: 9px;
  }

  .sustainability-text {
    font-size: 11px;
    line-height: normal;
    margin-bottom: 20px;
  }
}

/* WooCommerce overrides */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

/* ========================================
   Product Page Styles (page-product.php)
   ======================================== */
.page-products-wrap {
  padding-top: var(--header-height);
  padding-bottom: 60px;
  background: var(--color-white);
}

.page-products-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 50px;
  position: relative;
}

.pl-products-content {
  padding-top: 40px;
}

/* Breadcrumbs */
.pl-breadcrumb-bar {
  width: 100%;
  height: 68px;
  align-content: center;
  /* 上紫下黃的品牌漸層，跟時間軸圓點、訂閱按鈕同一組代號 */
  background: linear-gradient(
    180deg,
    var(--color-gradient-from) -30%,
    var(--color-gradient-to) 115%
  );
}

.pl-breadcrumb-container {
  padding-top: 14px;
  padding-bottom: 14px;
}

.pl-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-light);
  text-align: left;
}

.pl-breadcrumbs a {
  color: var(--color-text-light);
  text-decoration: none;
}

.pl-breadcrumbs a:hover {
  color: var(--color-primary);
}

.pl-breadcrumb-sep {
  margin: 0 8px;
  color: var(--color-grey);
}

.pl-breadcrumbs .current {
  color: var(--color-text-light);
}

/* Title Section */
.pl-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.pl-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
}

.pl-title-underline {
  width: 200px;
  height: 2px;
  background: var(--color-accent);
}

.pl-subtitle {
  font-size: 14px;
  color: var(--color-text-light);
}

/* Toolbar */
.pl-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 40px;
}

.pl-filters,
.pl-categories {
  display: flex;
  gap: 20px;
  align-items: center;
}

.pl-categories {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.pl-categories.is-scrollable {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.pl-categories .pl-btn-outline {
  flex: 0 0 auto;
}

/* 分類列可捲動提示：邊緣漸層遮罩（由 JS 依捲動位置切換左右） */
.pl-categories.pl-cat--scroll-start {
  -webkit-mask-image: linear-gradient(
    90deg,
    var(--color-black) 80%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg, var(--color-black) 80%, transparent 100%);
}
.pl-categories.pl-cat--scroll-mid {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    var(--color-black) 8%,
    var(--color-black) 80%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    var(--color-black) 8%,
    var(--color-black) 80%,
    transparent 100%
  );
}
.pl-categories.pl-cat--scroll-end {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    var(--color-black) 20%,
    var(--color-black) 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    var(--color-black) 20%,
    var(--color-black) 100%
  );
}

.pl-sort {
  margin-left: auto;
}

.pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  padding: 0 30px;
  border: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-strong);
  background: var(--color-white);
  transition: all 0.2s ease;
}

.pl-btn::after {
  content: "▼";
  font-size: 10px;
  margin-left: 8px;
}

.pl-filter-form {
  margin: 0;
}

.pl-sort-form {
  margin-left: auto;
}

.pl-sort-label {
  color: var(--color-text-light);
}

.pl-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* 實心三角（原本的樣子）。
   先前改成旋轉的 V 形，旋轉後外框比原本寬、會壓到選項文字，已還原。 */
.pl-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 0;
  height: 0;
  margin-top: -2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--color-text-strong);
  pointer-events: none;
  transition: border-top-color 0.2s ease;
}

.pl-select-wrap:hover::after,
.pl-select-wrap:focus-within::after {
  border-top-color: var(--color-primary);
}

.pl-select {
  /* 兩顆選單固定同寬。價格那顆原本是 width:auto，
     會被最長的選項「NT$1,000 - 3,000」撐到 174px，跟排序不對齊。
     右側 30px 內距是留給箭頭的，不留的話文字會被蓋住。 */
  width: 140px;
  height: 38px;
  padding: 0 30px 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-white);
  color: var(--color-text-strong);
  font-family: inherit;
  font-size: 13px;
  line-height: 36px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.pl-select:hover {
  border-color: var(--color-primary);
}

/* 價格與排序共用同一組尺寸，不再各自為政 */
.pl-filter-form .pl-select {
  width: 140px;
}

.pl-select:focus {
  outline: none;
  border-color: var(--color-primary);
  /* 用內陰影當第二層外框，focus 時輪廓更清楚但不撐開版面 */
  box-shadow: 0 0 0 1px var(--color-primary);
}

/* 下拉展開後的選項（各家瀏覽器支援度不同，能吃到就套） */
.pl-select option {
  padding: 8px 12px;
  background: var(--color-white);
  color: var(--color-text-strong);
}

.pl-select option:checked {
  background: var(--color-soft);
  color: var(--color-primary);
}

.pl-sort-select {
  width: 140px;
}

.pl-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  padding: 0 32px;
  border: 1px solid var(--color-primary);
  font-size: 13px;
  color: var(--color-primary);
  background: var(--color-white);
  transition: all 0.2s ease;
  cursor: pointer;
}

.pl-btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.page-products-wrap .pl-categories > button {
  display: none;
}

.page-products-wrap .pl-btn-outline.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.pl-btn {
  cursor: pointer;
}

.pl-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-light);
}

.pl-sort .pl-btn {
  padding: 0 16px;
}

/* Custom Product Card Modifiers for Listing */
.pl-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pl-image-box {
  position: relative;
  width: 100%;
  height: 350px;
  background: var(--color-border-light);
  overflow: hidden;
}

.pl-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pl-product-card:hover .pl-image {
  transform: scale(1.05);
}

.pl-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-pink);
  z-index: 5;
  transition: transform 0.2s;
}

.pl-fav-btn:hover {
  transform: scale(1.1);
}

.pl-variants {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10%;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 4;
}

.pl-product-card:hover .pl-variants {
  transform: translateY(0);
  opacity: 1;
}

.pl-variant-box {
  border: 1px solid var(--color-text-strong);
  font-size: 10px;
  color: var(--color-text-strong);
  width: 35px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.pl-variant-box:hover {
  background: var(--color-text-strong);
  color: var(--color-white);
}

/* Tags */
.pl-tag-sale {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-danger);
  color: var(--color-white);
  font-size: 11px;
  padding: 2px 12px;
  z-index: 5;
}

.pl-tag-vip {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 11px;
  padding: 2px 12px;
  z-index: 5;
}

/* Card Info */
.pl-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pl-name {
  font-size: 14px;
  color: var(--color-text-strong);
}

.pl-name a {
  color: inherit;
  text-decoration: none;
}

.pl-name-main,
.pl-name-sub {
  display: inline;
}

@media (min-width: 769px) {
  .pl-name-sub:not(:empty) {
    margin-left: 0.25em;
  }
}

.pl-name a:hover {
  color: var(--color-accent);
}

.pl-empty-notice {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-text-light);
  padding: 40px 0;
}

/* Search Results Page */
.page-search-wrap .pl-breadcrumbs a {
  color: var(--color-text-light);
  transition: color 0.2s ease;
}

.page-search-wrap .pl-breadcrumbs a:hover {
  color: var(--color-secondary-deep);
  opacity: 1;
}

.pl-breadcrumb-sep {
  margin: 0 8px;
}

.pl-search-toolbar {
  max-width: 640px;
  margin: 0 auto 40px;
}

.pl-search-form {
  display: flex;
  gap: 12px;
}

.pl-search-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.pl-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.pl-search-input::placeholder {
  color: var(--color-text-light);
}

.pl-search-submit {
  flex-shrink: 0;
  height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.pl-search-submit:hover {
  background: var(--color-primary-dark);
}

.pl-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 0 40px;
}

.pl-empty-state .pl-empty-notice {
  padding: 0;
}

.pl-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px;
  border: 1px solid var(--color-primary-deep);
  border-radius: 999px;
  color: var(--color-primary-deep);
  font-size: 14px;
  font-weight: 600;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.pl-empty-btn:hover {
  background: var(--color-primary-deep);
  color: var(--color-white);
  opacity: 1;
}

.pl-price-wrap {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.pl-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-black);
}

.pl-price.sale {
  color: var(--color-danger);
}

.pl-old-price {
  font-size: 14px;
  color: var(--color-text-light);
  text-decoration: line-through;
  font-weight: 400;
}

.pl-swatches {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.pl-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.pl-swatch.active {
  border: 1px solid var(--color-black);
  padding: 1px;
  background-clip: content-box;
}

/* Pagination */
/* 分頁點：與活動頁的 .events-pagination 同一套（尺寸、顏色、圓角）。
   原本這裡是 40x40 的圓形、用 --color-primary-deep，兩頁長得不一樣。 */
.pl-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 60px;
}

.pl-page {
  box-sizing: border-box;
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-primary);
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

a.pl-page:hover,
.pl-page.current {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.pl-page.current {
  cursor: default;
}

.pl-page.prev,
.pl-page.next {
  min-width: 56px;
  padding: 0 16px;
}

.pl-page.dots {
  cursor: default;
  pointer-events: none;
  letter-spacing: 1px;
}

@media (max-width: 1024px) {
  .pl-image-box {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .page-products-wrap {
    padding-top: var(--header-height);
    padding-bottom: 40px;
  }

  .page-products-container {
    padding: 0 clamp(34px, 9vw, 52px);
  }

  .pl-breadcrumb-container {
    min-height: 56px;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
  }

  .pl-products-content {
    padding-top: 31px;
  }

  .page-products-wrap .pl-breadcrumbs {
    display: flex;
    font-size: clamp(15px, 3.3vw, 19px);
    line-height: 1.2;
  }

  .pl-title-wrap {
    gap: 10px;
    margin-bottom: 28px;
    align-items: center;
  }

  .page-products-wrap .pl-title {
    font-size: clamp(18px, 3.8vw, 22px);
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-text);
    text-align: center;
  }

  .page-products-wrap .pl-title-underline {
    width: min(172px, 72vw);
    height: 2px;
    background: var(--color-accent);
  }

  .page-products-wrap .pl-subtitle {
    font-size: clamp(17px, 3.45vw, 20px);
    line-height: 1.3;
    color: var(--color-text-light);
    text-align: center;
    margin: 0;
  }

  .pl-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
  }

  .pl-title-underline {
    width: 120px;
  }

  .pl-subtitle {
    font-size: 12px;
    text-align: center;
  }

  .pl-search-toolbar {
    margin-bottom: 24px;
  }

  .pl-search-form {
    flex-direction: column;
  }

  .pl-search-submit {
    width: 100%;
  }

  .pl-toolbar {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px;
    row-gap: 18px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 470px;
    margin-left: auto;
    margin-right: auto;
  }

  /* 手機版不放價格區間：橫向空間本來就窄，
     兩顆選單並排會把排序擠到沒地方站。桌機版維持不變。 */
  .pl-filter-form {
    display: none;
  }

  .pl-filters {
    grid-column: 1;
    grid-row: 1;
    gap: 16px;
    min-width: 0;
  }

  /* 價格拿掉之後，排序自己橫跨整列並靠右 */
  .pl-sort,
  .pl-sort-form {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
    gap: 12px;
    font-size: clamp(14px, 3.1vw, 18px);
    white-space: nowrap;
  }

  .pl-sort-label {
    color: var(--color-text);
    font-size: clamp(14px, 3.1vw, 18px);
  }

  .pl-categories {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .pl-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-color: var(--color-border);
    color: var(--color-text-strong);
  }

  .pl-btn::after {
    margin-left: 4px;
    font-size: 8px;
  }

  .pl-select {
    width: clamp(110px, 30vw, 140px);
    height: 38px;
    padding: 0 30px 0 25px;
    font-size: clamp(14px, 3.1vw, 18px);
    line-height: 38px;
    text-align: left;
  }

  .pl-filter-form .pl-select {
    width: auto;
    min-width: clamp(82px, 19vw, 110px);
    padding-left: 36px;
    padding-right: 36px;
    text-align: center;
    text-align-last: center;
  }

  .pl-sort-select {
    width: clamp(110px, 30vw, 140px);
  }

  .pl-select-wrap::after {
    right: 18px;
    border-left-width: 8px;
    border-right-width: 8px;
    border-top-width: 14px;
    margin-top: -6px;
  }

  .pl-sort .pl-btn {
    padding: 0 10px;
  }

  .page-products-wrap .pl-btn-outline {
    flex: 0 0 auto;
    height: 39px;
    padding: 0 22px;
    font-size: clamp(14px, 3.1vw, 18px);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background: var(--color-white);
    border-radius: 0;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
  }

  .page-products-wrap .pl-btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
  }

  .page-products-wrap .pl-pagination .pl-page {
    width: auto;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    border-color: var(--color-primary);
    color: var(--color-primary);
  }

  .page-products-wrap .pl-pagination .pl-page.prev,
  .page-products-wrap .pl-pagination .pl-page.next {
    min-width: 52px;
    height: 24px;
    padding: 0 14px;
    font-size: 11px;
  }

  .page-products-wrap .pl-pagination a.pl-page:hover,
  .page-products-wrap .pl-pagination .pl-page.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
  }

  .page-products-wrap .pl-pagination .pl-page.dots {
    border-color: var(--color-primary);
    color: var(--color-primary);
  }

  .pl-btn-outline {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
  }

  .page-products-wrap .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 12px;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
    margin: 0;
  }

  .page-products-wrap .pl-product-card {
    gap: 10px;
    min-width: 0;
  }

  .page-products-wrap .pl-image-box {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .page-products-wrap .pl-product-card:hover .pl-image {
    transform: none;
  }

  .page-products-wrap .pl-fav-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
    top: 6px;
    right: 6px;
    border-color: var(--color-pink);
    color: var(--color-primary);
  }

  .page-products-wrap .pl-tag-sale {
    font-size: 10px;
    padding: 2px 8px;
  }

  .page-products-wrap .pl-name {
    font-size: 13px;
    line-height: 1.45;
  }

  .page-products-wrap .pl-name-main,
  .page-products-wrap .pl-name-sub {
    display: block;
  }

  .page-products-wrap .pl-name-sub {
    font-weight: 400;
  }

  .page-products-wrap .pl-price-wrap {
    gap: 6px;
  }

  .page-products-wrap .pl-price {
    font-size: 13px;
  }

  .page-products-wrap .pl-old-price {
    font-size: 12px;
  }

  .page-products-wrap .pl-pagination {
    margin-top: 32px;
  }
}

@media (max-width: 390px) {
  .page-products-container {
    padding-left: clamp(28px, 9vw, 34px);
    padding-right: clamp(28px, 9vw, 34px);
  }

  .pl-filters {
    gap: 6px;
  }

  .pl-select {
    width: clamp(62px, 20vw, 76px);
    padding: 0 20px 0 10px;
    font-size: clamp(11px, 3.5vw, 14px);
  }

  .pl-filter-form .pl-select {
    width: auto;
    min-width: clamp(62px, 20vw, 76px);
    padding-left: 24px;
    padding-right: 24px;
  }

  .pl-sort-select {
    width: clamp(74px, 23vw, 88px);
    padding-left: 10px;
  }

  .pl-sort-label {
    font-size: clamp(11px, 3.5vw, 14px);
  }

  .pl-sort,
  .pl-sort-form {
    gap: 4px;
  }

  .pl-select-wrap::after {
    right: 9px;
    border-left-width: 5px;
    border-right-width: 5px;
    border-top-width: 9px;
    margin-top: -4px;
  }

  .page-products-wrap .pl-btn-outline {
    padding: 0 18px;
    font-size: clamp(11px, 3.5vw, 14px);
  }

  .pl-categories {
    gap: 10px;
  }
}

/* ========================================
   About Us Page
   ======================================== */
.about-hero {
  position: relative;
  width: 100%;
  height: 505px;
  margin-top: var(--header-height);
  background: transparent;
  overflow: hidden;
}

.about-hero-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.about-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.1) 60%,
    transparent 100%
  );
  z-index: 2;
}

.about-hero-inner {
  position: relative;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  /* 設計稿不是垂直置中 —— 文字組固定在距 Hero 頂端 141px
     （.group top 205、Hero top 64）。用 center 會依內容高度浮動，
     文案一改長度整組位置就跑掉。 */
  align-items: flex-start;
  padding-top: 141px;
  box-sizing: border-box;
  z-index: 3;
}

.about-hero-content {
  position: relative;
  /* 設計稿 .group：寬 613px、距畫布左緣 390px。
     .about-hero-inner 是 max-width:1200 置中（1920 下從 360px 起），
     所以 padding-left 30 + 寬 643 剛好讓文字落在 390~1003。
     用 min() 保留 RWD —— 視窗變窄時跟著縮，不會爆版。 */
  width: min(643px, 100%);
  padding-left: 30px;
}

.about-hero-badge {
  display: inline-block;
  /* 設計稿 .div2：14px、#feedb7、無額外字距 */
  color: var(--color-yellow);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.about-hero-title {
  /* 設計稿 .b：42px、Noto Serif TC */
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 700;
  /* 設計稿：大標 top 237、裝飾線 top 307，中間只有 5px */
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.about-hero-underline {
  /* 設計稿：裝飾線在 top 102px、內文在 128px，間距約 23px */
  margin-bottom: 23px;
  display: flex;
  justify-content: flex-start;
}

.about-hero-underline::after {
  content: "";
  /* 設計稿 .vector-icon3：寬 13.02% of 613 ≈ 80px、高 3px、品牌粉 */
  background: var(--color-pink);
  width: 80px;
  height: 3px;
  object-fit: fill;
  display: block;
}

.about-hero-desc {
  color: var(--color-white);
  font-size: 16px;
  /* 設計稿 .div3 未指定行高，交給字型本身。
     寫死 1.9 會讓整段變高，Hero 是垂直置中的，內容一高整組就往上跑。 */
  line-height: normal;
  margin-bottom: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.about-hero-quote {
  color: var(--color-accent);
  font-size: 14px;
  font-style: italic;
}

.about-hero-mobile {
  display: none;
}

.about-hero-mobile-inner {
  position: relative;
  width: 100%;
  /* 原本是 aspect-ratio: 375/190 —— 高度被鎖死在 190px，
     但內容實際要 210px，最後一行被 overflow: hidden 切掉。
     改成下限：維持設計稿比例，文字多的時候讓它長高。 */
  min-height: calc(100vw * 190 / 375);
  overflow: hidden;
  display: flex;
  /* 不能用預設的 stretch —— 那會把內容框「拉」成正好 190px，
     文字一樣溢出、只是改成上下都被切。flex-start 讓內容框依內容自己算高度，
     容器的 auto 高度才會跟著長。 */
  align-items: flex-start;
}

.about-hero-mobile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-hero-mobile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.about-hero-mobile-content {
  /* 進入常規流（原本是 position: absolute; inset: 0）——
     絕對定位不撐高度，容器就永遠是 190px、文字只能被切掉。 */
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 35px;
  text-align: left;
}

.about-hero-mobile-badge {
  margin: 0 0 6px;
  /* 設計稿在「黑曜石」後換行，不是等到整行排滿。
     19 字 × 12px ≈ 228px，所以卡在 232px。 */
  max-width: 232px;
  color: var(--color-accent-light);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.about-hero-mobile-title-wrap {
  margin-bottom: 16px;
}

.about-hero-mobile-title {
  margin: 0 0 7px;
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 29px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.about-hero-mobile-underline {
  display: flex;
  justify-content: flex-start;
}

.about-hero-mobile-underline::after {
  content: "";
  /* 品牌粉 #FFD5D5，跟桌機的 .about-hero-underline 一致。
     原本是 --color-accent（紫），手機版漏改了。 */
  background: var(--color-pink);
  width: 80px;
  height: 3px;
  object-fit: fill;
  display: block;
}

.about-hero-mobile-desc {
  margin: 0;
  /* 原本 max-width: 259px 比內容區(305px)還窄，硬是多擠出兩行 */
  max-width: none;
  color: var(--color-white);
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.about-hero-mobile-desc br {
  display: none;
}

/* Design Philosophy */
.about-philosophy {
  padding: 42px 0 31px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.philosophy-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 62px;
}

.stat-card {
  width: 148px;
  height: 215px;
  border: 1px solid var(--color-text);
  border-radius: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-10px);
}

.stat-number {
  /* 設計稿 .b2：數字 36px、後綴 28px，色 #b886cf */
  color: var(--color-accent);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-number-suffix {
  /* 設計稿 .span：後綴比數字小一級 */
  font-size: 28px;
}

.stat-text {
  /* 設計稿 .div5：12px、#333 */
  color: var(--color-text-strong);
  font-size: 12px;
  margin-top: 4px;
  /* 整塊本來就被 flex 置中，但裡面是 text-align: start，
     換行時第二行會靠左、兩行不對稱。手機版本來就有這一行。 */
  text-align: center;
}

/* 換行依照自訂器裡打的走。
   原本桌機把 <br> 設成 display:none（假設「桌機夠寬，四張都是一行」），
   結果就是後台打了換行、桌機却看不到 —— 斷在哪裡應該由人決定。 */
.stat-text br {
  display: block;
}

.philosophy-features {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  /* 設計稿 .frame-group：寬 1005px、gap 64px。
     gap 用 clamp 讓窄一點的桌機也放得下，不會把說明擠到換行。 */
  gap: clamp(28px, 3.3vw, 64px);
  max-width: 1005px;
  margin: 45px auto 48px;
  padding: 0 20px;
  /* Add side padding to keep it from hitting the edges */
}

.feature-item {
  display: flex;
  /* 設計稿 .frame-container：圖示組與說明並排、gap 13px。
     不用 flex:1 —— 設計稿三組寬度依內容而定（第三組的說明最長），
     強制等寬會把最長那組擠成三行。 */
  gap: 13px;
  align-items: flex-end;
  justify-content: center;
  flex: 0 1 auto;
}

.feature-heading {
  /* 設計稿 .group-parent：圖示在上、標題在下 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}

.feature-icon img {
  /* 三個圖示的原始尺寸各不相同（36×38 / 57×38 / 38×32），
     寫死 42×42 會把它們拉變形。交給 SVG 自己的 width/height。 */
  width: auto;
  height: auto;
}

/* 設計稿 .wrapper：標題盒左對齊 */
.feature-title {
  /* 設計稿 .frame-group font-size: 18px */
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  white-space: nowrap;
}

.feature-desc {
  /* 設計稿 .div11：12px、靠左 */
  font-size: 12px;
  text-align: left;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
  padding-top: 3px;
  flex: 1;
}

/* 標籤行（天然水晶｜水晶推薦｜…）：設計稿 .div11 本體色 #b886cf。
   與說明本文一樣不換行 —— 這行是「A｜B｜C」的並列標籤，
   被折斷會變成孤字（例如只剩一個「書」）。 */
.feature-desc-tags {
  display: block;
  color: var(--color-accent);
  margin-bottom: 1em;
  white-space: nowrap;
}

/* 說明本文：設計稿 .span5 色 #888。
   nowrap 讓每一行維持後台打的斷行 —— 想換行就在自訂器按 Enter，
   而不是靠容器寬度剛好把它擠斷。 */
.feature-desc-body {
  display: block;
  color: var(--color-text-light);
  white-space: nowrap;
}

/* Brand Timeline */
.about-timeline-section {
  /* 上方留白從 39px 加到 72px：原本標題太貼區塊上緣 */
  padding: 72px 0 15px;
  position: relative;
  background: var(--color-border-light);
  /* 設計稿淺米色 */
}

.timeline-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  height: 240px;
  margin-top: 0;
}

/* 水平虛線 */
.timeline-line-dashed {
  position: absolute;
  top: 100px;
  /* 線條垂直位置 */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  /* 用漸層畫虛線，不用 border-style: dashed ——
     dashed 的線段長度與間隔由瀏覽器決定，改不了也各家不一致。
     這裡 14px 實線 + 14px 空白，想調疏密就改這兩個值。 */
  height: 2px;
  background-image: repeating-linear-gradient(
    to right,
    var(--color-white) 0 14px,
    transparent 14px 28px
  );
  z-index: 1;
}

/* 端點小黑點 */
.line-dot-start,
.line-dot-end {
  position: absolute;
  /* 垂直置中在線上。原本是 top: -4px —— 那是配合舊的
     height:0 + border-top 手動湊出來的值，線粗一改就偏掉。
     用 50% + translateY 之後，線多粗都會自己對齊。 */
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-white);
  border-radius: 50%;
}

/* 對齊線的兩端，但不越界。
   原本是 -3px（圓點正好騎在端點上）—— 線是滿寬的，
   右邊那顆就伸出畫面 3px，把整頁擐出橫向滾動（834 / 1024px 實測）。
   6px 的裝飾圓點內縮 3px 看不出來，但頁面不再溢出。 */
.line-dot-start {
  left: 0;
}

.line-dot-end {
  right: 0;
}

.timeline-nodes {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  z-index: 2;
  padding: 0 100px;
}

.timeline-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 設計稿：階段欄 38 + gap 6 + 文字 146 ≈ 190 */
  width: 190px;
}

/* 年份在上 */
.node-year {
  position: absolute;
  top: 30px;
  font-size: 20px;
  font-weight: 700;
  /* 這一區的底是深色情境圖，字一律淺色 */
  color: var(--color-white);
  font-family: var(--font-serif);
}

.timeline-node.current .node-year {
  /* 設計稿 .b13：上紫下黃的漸層字。
     background-clip:text 需要文字色透明，才看得到底下的漸層。 */
  background: linear-gradient(
    180deg,
    var(--color-gradient-from) 0%,
    var(--color-gradient-to) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 垂直連接線 */
.node-connector {
  position: absolute;
  top: 64px;
  width: 1px;
  height: 72px;
  background: var(--color-white);
}

/* 線上的小圓點 */
.node-dot-small {
  position: absolute;
  top: 60px;
  /* 對齊虛線 */
  width: 8px;
  height: 8px;
  background: var(--color-pink);
  border-radius: 50%;
}

/* 下方的內容區 (大圓點 + 文字) */
.node-content {
  position: absolute;
  top: 136px;
  display: flex;
  align-items: flex-start;
  /* 設計稿 .frame-parent5：gap 6px */
  gap: 6px;
  left: 50%;
  transform: translateX(-16px);
  /* 稍微向左偏移讓圓點對齊中心 */
}

/* 五個大圓點都是上 #EFA2F0、下 #FFFCA1 的漸層 */
.node-dot-large {
  width: 32px;
  height: 32px;
  background: linear-gradient(
    180deg,
    var(--color-gradient-from) 0%,
    var(--color-gradient-to) 100%
  );
  border-radius: 50%;
  opacity: 1;
  flex-shrink: 0;
}

/* 「穩定」不再需要專屬覆寫 —— 五顆大圓點的漸層已統一在 .node-dot-large。
   只有階段名的漸層字是這個節點獨有的。 */

.node-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  /* 設計稿 .div15~.div23：說明寬 133~146px。
     原本是 nowrap 且不限寬 —— 長句會一路往右壓到隔壁節點上。 */
  width: 146px;
  white-space: normal;
}

.node-title {
  font-size: 14px;
  color: var(--color-white);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1px;
}

.node-desc {
  /* 設計稿 .div15 等：11px、#ffd5d5 */
  font-size: 11px;
  line-height: 1.25;
  color: var(--color-pink);
}

/* Brand Timeline Mobile (Figma 2054:4616)
   配色一律沿用桌機 .about-timeline-section 那一組 ——
   這一區鋪的是深色情境圖，先前整組是照淺色底寫的，
   標題與階段名都是深色字壓在深色圖上，幾乎看不見。 */
.about-timeline-mobile {
  display: none;
  /* 底圖載入前／載入失敗時的備用色也要是深色，
     否則白字會落在淺灰底上。 */
  background-color: var(--color-secondary);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.about-timeline-mobile-inner {
  max-width: 276px;
  margin: 0 auto;
  padding: 32px 0 48px;
}

.about-timeline-mobile-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.about-timeline-mobile-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
}

.about-timeline-mobile-underline {
  width: 111px;
  height: 2px;
  /* 同桌機 .about-timeline-section .section-title-underline::after */
  background: var(--color-pink);
}

.timeline-mobile-body {
  position: relative;
  margin-top: 56px;
  transform: translateX(-12px);
}

.timeline-mobile-spine {
  position: absolute;
  left: calc(127px - 2.5rem);
  top: calc(20px - 2rem);
  bottom: calc(20px - 2rem);
  width: 6px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.timeline-mobile-spine-line {
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  /* 同桌機 .timeline-line-dashed：用漸層畫虛線而不是 border-style: dashed，
     dashed 的線段長度瀏覽器說了算，改不動也各家不一致。 */
  width: 2px;
  transform: translateX(-50%);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--color-white) 0 14px,
    transparent 14px 28px
  );
}

.timeline-mobile-spine-dot {
  position: absolute;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-white);
  transform: translateX(-50%);
}

.timeline-mobile-spine-dot--top {
  top: 0;
}

.timeline-mobile-spine-dot--bottom {
  bottom: 0;
}

.timeline-mobile-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 42px;
}

.timeline-mobile-item {
  position: relative;
  min-height: 40px;
}

.timeline-mobile-label {
  position: absolute;
  left: 0;
  top: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 135px;
}

.timeline-mobile-phase {
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  color: var(--color-white);
  white-space: nowrap;
}

/* 「穩定」是上紫下黃的漸層字，同桌機 .timeline-node.current .node-year。
   background-clip: text 需要文字色透明，才看得到底下的漸層。 */
.timeline-mobile-item.current .timeline-mobile-phase {
  background: linear-gradient(
    180deg,
    var(--color-gradient-from) 0%,
    var(--color-gradient-to) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.timeline-mobile-dot-small {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-pink);
  flex-shrink: 0;
}

.timeline-mobile-connector {
  position: absolute;
  left: 45px;
  top: 18px;
  width: 96px;
  height: 1px;
  background: var(--color-white);
  z-index: 1;
}

/* 五顆大圓點的漸層色跟桌機同一組（#EFA2F0 -> #FFFCA1），
   但方向跟著版面走：手機是直式時間軸，圓點左紫右黃（90deg）；
   桌機是橫式，圓點上紫下黃（180deg）。 */
.timeline-mobile-dot-large {
  position: absolute;
  left: 125px;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    var(--color-gradient-from) 0%,
    var(--color-gradient-to) 100%
  );
  z-index: 3;
}

/* 原本是 width: max-content + nowrap —— 說明文字有多長就撐多寬，
   最長的一筆到 300px，起點又在 x=201，整頁被撐到 502px 寬、
   手機出現橫向捲軸。設計稿的說明本來就是換行的。 */
.timeline-mobile-text {
  margin-left: 163px;
  min-height: 40px;
  width: auto;
  max-width: none;
}

.timeline-mobile-event-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: var(--color-white);
}

.timeline-mobile-event-desc {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
  color: var(--color-pink);
}

/* Brand Honors */
.about-honors {
  padding: 100px 0;
  max-width: 100%;
  margin: 0 auto;
  /* 背景留透明 —— 這區在 .about-decor-band 裡，白底由 band 畫。
     這裡再鋪一次白色會把裝飾圖蓋掉。 */
  background: transparent;
}

/* 「品牌信任」＋「選購服務」共用的裝飾層。
   設計稿的手戴手鐲圖橫跨這兩區、滿版高度，所以定位基準是這個容器，
   而不是單一 section。 */
.about-decor-band {
  position: relative;
  /* 裝飾圖切齊左邊界，不撐出橫向捲軸 */
  overflow: hidden;
  background: var(--color-white);
}

/* 圖由自訂器帶入 --about-honors-decor，沒設定就是 none —— 不顯示。 */
.about-decor-band::before {
  content: "";
  position: absolute;
  /* 圖片本身的手臂已經切齊自己的左下角，只需要一點點出血把手鐲帶出畫面 */
  left: -54px;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: var(--about-honors-decor, none);
  background-repeat: no-repeat;
  background-position: left center;
  /* 滿版高度：寬度依原比例(863:854)自動算，不裁切 */
  background-size: auto 100%;
  z-index: 0;
  pointer-events: none;
}

/* 內容一律疊在裝飾圖之上 */
.about-decor-band > section {
  position: relative;
  z-index: 1;
}

.honors-grid {
  display: flex;
  gap: 33px;
  justify-content: center;
  /* 卡片寬度改成可彈性之後，靠這行保證四張還是齊高 */
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 60px;
}

.honor-card {
  /*
   * 設計稿 .group-wrapper3：178×194、圓角 12、1px #b886cf。
   *
   * 寬度改成「至少 178」而不是寫死：
   * 原本內寬只有 136px，而「重視色澤、質感與完整度」這種 11 字的句子
   * 剛好也是 136px —— 左右各只剩 1px，看起來就是貼著框線。
   * 讓它可以往外長一點，文字才有呼吸空間；四張卡片靠 align-items 等高。
   */
  width: auto;
  min-width: 178px;
  max-width: 240px;
  height: 194px;
  border: 1px solid var(--color-accent);
  border-radius: 12px;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  /* 內容整組置中。原本是 justify-content: flex-end（文字靠底），
     那是配合上方那張圖示排的；圖示改為選填之後靠底會變成空一大塊。 */
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* 左右從 20 加到 28，文字不再貼框線 */
  padding: 24px 28px;
  position: relative;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
  text-align: center;
}

/* 沒有圖示的卡片：文字整組垂直置中（設計稿即為此，四張卡都沒有圖） */
.honor-card--no-icon {
  justify-content: center;
}

.honor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px
    color-mix(in srgb, var(--color-accent) 10%, transparent);
}

.honor-icon {
  /* 隨 flex 流排在文字上方，而不是 position: absolute 釘在 top: 35px。
     圖示變成選填之後，絕對定位會讓「有圖」的卡片圖文互相重疊。 */
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.honor-icon img {
  /* 用明確尺寸而非 max-width/max-height。
     這些 SVG 是 width="100%" height="100%" 的 Figma 匯出檔，沒有固有尺寸，
     用 max-* 會讓 <img> 的實際寬高在載入過程中變動、置中位置跟著跳，
     版面與量測都不穩定。固定成容器大小＋contain，比例仍然保留。 */
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.honor-text {
  position: relative;
  z-index: 2;
  width: 100%;
}

.honor-text h3 {
  /* 設計稿 .frame-parent10：16px、#b886cf */
  font-size: 16px;
  font-weight: 700;
  color: var(--color-accent);
  /* 橘色標題 */
  margin-bottom: 4px;
}

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

/* Design Team */
.about-team {
  padding-bottom: 80px;
  /* 同 .about-honors：白底交給 .about-decor-band 畫，
     這裡再鋪一次會蓋掉裝飾圖。 */
  background: transparent;
  color: var(--color-text);
}

.about-team .section-title {
  color: var(--color-text);
}

/* About 頁電腦端區塊標題與底線 */
@media (min-width: 769px) {
  .about-philosophy .section-title,
  .about-timeline-section .section-title,
  .about-honors .section-title,
  .about-team .section-title {
    color: var(--color-text);
    text-align: center;
    font-family: "Noto Sans TC", sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }

  /* 品牌歷程是深色底：標題改白字，裝飾線改品牌粉。
   其餘三區（水晶推薦／品牌信任／選購服務）是白底，維持深字紫線。 */
  .about-timeline-section .section-title {
    color: var(--color-white);
  }

  .about-timeline-section .section-title-underline::after {
    background: var(--color-pink);
  }

  /* 線條由全域的 .section-title-underline::after 畫（200×2px）。
     這裡原本又加了一條 border-top: 2px，兩條疊在一起 ——
     畫面上看起來是一條 4px 粗線，實際上是重複的兩條。 */
  .about-philosophy .section-title-underline,
  .about-honors .section-title-underline,
  .about-team .section-title-underline {
    margin-top: 0;
  }

  .about-philosophy .section-title-underline img,
  .about-timeline-section .section-title-underline img,
  .about-honors .section-title-underline img,
  .about-team .section-title-underline img {
    display: none;
  }
}

.team-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 30px;
  justify-content: center;
}

.team-card {
  width: 220px;
  height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .team-photo {
  transform: scale(1.05);
}

.team-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  backdrop-filter: blur(2px);
  border-radius: 0 0 22px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 10px 10px;
  transition: height 0.3s ease;
}

.team-name-role {
  display: flex;
  align-items: center;
}

.team-name-role h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-white);
}

.team-name-role span {
  font-size: 15px;
  color: var(--color-accent-light);
}

.team-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 5px 0;
}

@media (min-width: 769px) {
  .about-team .team-divider {
    display: block !important;
    flex: 0 0 auto;
    position: relative;
    z-index: 5;
    width: calc(100% - 24px);
    height: 1px;
    margin: 7px auto 6px;
    background: rgba(255, 255, 255, 0.82) !important;
  }
}

/* 設計稿是兩行堆疊、一段一行、置中。
   原本是 flex row + gap 10px —— 兩段並排成兩欄（各 95px），
   每欄再各自從中間折斷（「依照顏色、配戴感／與日常風格」）。 */
.team-desc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  /* 以標題當基準尺換算設計稿：說明/標題的每字寬比是 0.687，
     11px 時只有 0.579。標題 19px -> 說明 13px。 */
  font-size: 12px;
  line-height: 16px;
  color: var(--color-border);
  font-weight: 400;
  text-align: center;
}

.team-desc p {
  margin: 0;
  /* 每一行維持後台打的內容，不靠卡片寬度硬折 */
  white-space: nowrap;
}

/* Subscribe Section */
.about-subscribe {
  position: relative;
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.subscribe-bg {
  position: absolute;
  inset: 0;
  /* 圖由 template-parts/newsletter.php 以 CSS 變數帶入。
     不寫成行內 background-image —— 行內樣式會蓋掉樣式表，
     手機版就得靠一整串 !important 才改得動。 */
  background-image: var(--subscribe-bg, none);
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.subscribe-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.subscribe-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.subscribe-subtitle {
  color: var(--color-accent-light);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: block;
}

.subscribe-title {
  color: var(--color-white);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.subscribe-form {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  height: 40px;
}

.subscribe-form input {
  flex: 1;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-white);
  border-right: none;
  color: var(--color-white);
  font-size: 13px;
  padding: 0 15px;
  outline: none;
  box-sizing: border-box;
}

.subscribe-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.subscribe-form button {
  /* 上紫下黃的品牌漸層，同時間軸大圓點與「穩定」漸層字用的是同一組代號 */
  background: linear-gradient(
    180deg,
    var(--color-gradient-from) 0%,
    var(--color-gradient-to) 100%
  );
  color: var(--color-text);
  border: 1px solid var(--color-white);
  width: 100px;
  height: 40px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 0;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-sizing: border-box;
}

.subscribe-form button:hover {
  /* 字色維持黑色，不要在 hover 時跳成紫色 */
  background: var(--color-white);
  color: var(--color-text);
}

/* Responsive */
@media (max-width: 1200px) {
  .about-hero-visual {
    right: -50px;
    width: 55%;
  }

  .philosophy-stats {
    gap: 30px;
    flex-wrap: wrap;
  }

  .philosophy-features {
    gap: 20px;
    flex-wrap: wrap;
  }

  .timeline-nodes {
    width: 90%;
  }
}

@media (max-width: 768px) {
  .about-hero {
    display: none !important;
  }

  .about-hero-mobile {
    display: block;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: var(--header-height);
    overflow: hidden;
  }

  .about-hero-mobile-inner {
    width: 100%;
    /* 這裡原本又把 aspect-ratio 設回去，蓋掉上面改成 min-height 的修正 */
    min-height: calc(100vw * 190 / 375);
  }

  .about-philosophy .section-title-wrap,
  .about-honors .section-title-wrap,
  .about-team .section-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
  }

  .about-philosophy .section-title,
  .about-honors .section-title,
  .about-team .section-title,
  .about-timeline-mobile-title {
    align-self: stretch;
    margin: 0;
    color: var(--color-text);
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: 22px;
    word-break: break-word;
  }

  /* 品牌歷程是深色底，不能跟上面三個白底區塊共用深色字。
     排在群組規則之後才蓋得掉。 */
  .about-timeline-mobile-title {
    color: var(--color-white);
  }

  /* 水晶推薦的區塊標題比其他區大一級。
     以標籤行當基準尺換算：設計稿標題/標籤行 = 0.315，13px 時只有 0.256。
     品牌歷程那區量出來是 13px，所以維持群組值，只改這一區。 */
  .about-philosophy .section-title {
    font-size: 15px;
  }

  /* 同上：尺寸改畫在 ::after 上，不要再用 border-top 疊第二條。
     手機版更明顯 —— 元素只有 110.854px 寬，但 ::after 是 200px，
     兩條長度還不一樣，看起來就是一長一短。 */
  .about-philosophy .section-title-underline,
  .about-honors .section-title-underline,
  .about-team .section-title-underline {
    margin-top: 0;
  }

  .about-philosophy .section-title-underline::after,
  .about-honors .section-title-underline::after,
  .about-team .section-title-underline::after {
    width: 110.854px;
    height: 1.109px;
  }

  /* 這個是獨立的 <div>，沒有 ::after，線得自己畫。
     深色底 → 品牌粉，跟桌機的品牌歷程底線一致（其餘三區才是紫）。 */
  .about-timeline-mobile-underline {
    margin-top: 0;
    width: 110.854px;
    height: 0;
    flex-shrink: 0;
    border-top: 1.109px solid var(--color-pink);
    background: none;
    display: block;
  }

  .about-philosophy .section-title-underline img,
  .about-honors .section-title-underline img,
  .about-team .section-title-underline img {
    display: none;
  }

  .about-philosophy {
    padding: 40px 0;
  }

  .philosophy-features {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 281px;
    margin: 0 auto 28px;
    padding: 0;
  }

  .feature-item {
    justify-content: flex-start;
    align-items: center;
  }

  .feature-heading {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 52px;
  }

  /* 設計稿圖示/標籤行 = 0.161，24px 時只有 0.124 —— 換算約 31px */
  .feature-icon img {
    width: 31px;
    height: 31px;
  }

  /* .feature-title-group 已在桌機改寫掉（標題不再包一層），
     這裡跟著換成新的 .feature-title。 */
  .feature-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    color: var(--color-text);
    margin: 0;
    white-space: nowrap;
  }

  .feature-desc {
    font-size: 12px;
    font-weight: 400;
    line-height: 13px;
    color: var(--color-text-light);
    margin: 0;
    padding-top: 0;
    flex: 0 1 auto;
    white-space: pre-line;
  }

  .feature-desc br {
    display: block;
    margin-top: -1px;
  }

  /* 標籤行與說明本文的間距，手機版收窄（桌機是 1em = 12px） */
  .feature-desc-tags {
    margin-bottom: 5px;
  }
  .feature-desc-tags {
    white-space: wrap;
  }
  .feature-desc-body {
    white-space: wrap;
  }

  /* 尺寸以卡片寬度當基準尺換算設計稿：
     卡高/卡寬 1.207、欄間距 0.241、列間距 0.379。
     整組寬度佔版面 78%（375 -> 292px）。 */
  .philosophy-stats {
    display: grid;
    grid-template-columns: repeat(2, 131px);
    column-gap: 24px;
    row-gap: 12px;
    justify-content: center;
    width: 292px;
    max-width: calc(100% - 40px);
    margin: 28px auto 0;
  }

  .stat-card {
    width: 131px;
    height: 158px;
    padding: 0 10px;
    gap: 5px;
  }

  .stat-card:hover {
    transform: none;
  }

  .stat-number {
    font-size: 18px;
    line-height: 22px;
  }

  /* 後綴的 28px 只寫在桌機，手機沒覆寫 ——
     結果數字 18px、後綴 28px，大小是反的。
     設計稿手機版「3大系列」整串同一級。 */
  .stat-number-suffix {
    font-size: inherit;
  }

  .stat-text {
    font-size: 11px;
    /* 原本 line-height 跟字級一樣（11px），完全沒有行距，
       兩行的說明會擠在一起。 */
    line-height: 17px;
    margin-top: 0;
    text-align: center;
    max-width: 104px;
  }

  /* 手機版卡片窄，設計稿在這裡是兩行 —— 把桌機藏起來的換行放出來。
     斷點看自訂器裡打的 Enter，不是靠寬度硬擠。 */
  .stat-text br {
    display: block;
  }

  .about-timeline-section {
    display: none !important;
  }

  .about-timeline-mobile {
    display: block;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 50px;
    padding-right: 49px;
    min-height: 570px;
  }

  .about-timeline-mobile-inner {
    max-width: 276px;
  }

  .about-honors {
    box-sizing: border-box;
    min-height: min(720px, 100svh);
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* 桌機那張是滿版高度（background-size: auto 100%），
     手機的 band 高將近 1700px，直接沿用會變成一張超大的圖。
     手機用另一張、另一種擺法，見下面的 .about-honors::after。 */
  .about-decor-band::before {
    display: none;
  }

  /* 手機版裝飾圖：跨在「品牌信任」與「選購服務」交界處。
     掛在 .about-honors::after 而不是 .about-team::before ——
     .about-honors 在 DOM 順序上比較前面，選購服務的卡片才會蓋在圖上面。
     沒設定圖就整條規則不生效（沒有 --has-mobile-decor 這個 class）。 */
  .about-decor-band--has-mobile-decor .about-honors::after {
    content: "";
    position: absolute;
    /* 往下跨進「選購服務」 */
    bottom: -355px;
    width: 100%;
    height: 100%;
    background-image: var(--about-honors-decor-mobile, none);
    background-repeat: no-repeat;
    background-size: contain;
    /* 負值：壓在同一區塊的標題與卡片底下。
       .about-honors 本身是 z-index: 1 的堆疊環境，所以不會掉到 band 底色之下。 */
    z-index: -1;
    pointer-events: none;
  }

  .about-decor-band--mobile-right .about-honors::after {
    right: 0;
    background-position: right bottom;
  }

  .about-decor-band--mobile-left .about-honors::after {
    left: 0;
    background-position: left bottom;
  }

  .honors-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: min(257px, calc(100% - 40px));
    max-width: 257px;
    margin: 0 auto;
    align-self: center;
    flex-wrap: nowrap;
  }

  .honor-card {
    /* 手機版回到固定寬：基底規則的 min/max-width 是為了桌機文字不貼框，
       這裡不需要（本來就是橫向排列、文字旁邊有 47px 餘裕） */
    width: 257px;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 108px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--color-primary);
    border-radius: 11px;
    text-align: center;
  }

  .honor-card:hover {
    transform: none;
    box-shadow: none;
  }

  .honor-icon {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    order: -1;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    margin-right: 0;
  }

  .honor-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    /* 同上：原本用色相濾鏡把圖示染成舊的橘色，換品牌時調不到。
       圖示如需上色，請改用帶 currentColor 的 SVG。 */
  }

  .honor-text {
    flex: 0 1 146px;
    min-width: 0;
    text-align: center;
  }

  .honor-text h3 {
    font-size: 14px;
    line-height: 17px;
    margin-bottom: 5px;
    color: var(--color-primary);
    font-weight: 700;
  }

  .honor-text p {
    font-size: 12px;
    line-height: 14px;
    color: var(--color-text-light);
    white-space: normal;
  }

  .about-team {
    padding-top: 30px;
  }

  .team-grid {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .team-card {
    width: 100%;
    max-width: 244px;
    /* 設計稿卡高/卡寬 = 0.596（180px 時只有 0.5625） */
    height: 150px;
    border-radius: 20px;
  }

  .team-card:hover .team-photo {
    transform: none;
  }

  .team-info {
    /* 說明從 13px 放大到 17px、兩行，82px 裝不下 */
    padding: 10px 20px;
    border-radius: 0 0 20px 20px;
  }

  .team-name-role {
    margin-bottom: 0;
  }

  .team-name-role h3 {
    font-size: 13px;
  }

  .about-team .team-divider {
    display: block !important;
    flex: 0 0 auto;
    /* 設計稿分隔線/卡寬 = 0.704（原本 -32px 是 0.775，偏寬） */
    width: 100%;
    height: 1px;
    margin: 7px auto 6px;
    background: rgba(255, 255, 255, 0.82) !important;
  }

  /* 設計稿是兩行堆疊。原本沿用桌機的 flex row ——
     兩段說明並排成一行，320px 的卡片左右都被切掉。 */
  .team-desc {
    flex-direction: column;
    align-items: center;
    /* 設計稿說明/卡寬 = 0.686，13px 時只有 0.525 —— 換算是 17px。
       標題比例是 0.234 vs 0.235 本來就吻合，所以只有說明要放大。 */
    font-size: 12px;
    line-height: 15px;
    color: var(--color-white);
    font-weight: 400;
    justify-content: center;
    width: 100%;
    text-align: center;
    gap: 0;
  }

  .team-desc p {
    margin: 0;
    width: auto;
    flex: 0 0 auto;
    text-align: center;
    /* 每一行維持後台打的內容，不靠卡片寬度硬折 */
    white-space: nowrap;
  }

  .about-subscribe {
    height: 205px;
  }

  .subscribe-subtitle {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .subscribe-title {
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.4;
  }

  /* 手機有專屬底圖就用它，沒有就沿用電腦版那張。
     原本這裡寫死 placeholder.svg + !important —— 聯絡我們與活動專區的
     手機版因此一直顯示佔位圖，只有關於我們那頁因為自己又印了一段
     更後面的 !important 才蓋回真正的圖。 */
  .subscribe-bg {
    background-image: var(--subscribe-bg-mobile, var(--subscribe-bg, none));
    background-position: center center;
  }

  .subscribe-form {
    width: 100%;
    max-width: 335px;
    height: 40px;
    flex-direction: row;
    gap: 0;
    margin: 0 auto;
  }

  .subscribe-form input {
    border-right: none;
    width: auto;
    flex: 1;
  }

  .subscribe-form button {
    width: 100px;
  }
}

/* ============================================================
   AJAX 加入購物車 Toast 與動畫樣式
   ============================================================ */
.stylux-toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stylux-toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 14px 22px;
  border-radius: 8px;
  color: var(--color-text-strong);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.4s;
  opacity: 0;
  min-width: 280px;
}

.stylux-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.stylux-toast-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.stylux-toast-link:hover {
  text-decoration: underline;
}

/* 「已訂閱 ✓」「已加入 ✓」的完成狀態。
   原本是 main.js 用 inline style 塞 #8B9E6B，換品牌時 JS 裡的色碼調不到，
   而且 inline style 的優先權比什麼都高，CSS 想蓋也蓋不掉。 */
.is-done {
  background: var(--color-success) !important;
  border-color: var(--color-success) !important;
  color: var(--color-white) !important;
}

.stylux-toast-icon {
  width: 20px;
  height: 20px;
  background: var(--color-success);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

/* 必須排在 .stylux-toast-icon 之後：同權重時後者勝，
   放前面的話這個 background 會被上面的 success 綠蓋掉。 */
.stylux-toast-icon--error {
  background: var(--color-danger);
}

.stylux-toast-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--color-grey);
  cursor: pointer;
  padding: 0 0 0 12px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.2s;
}

.stylux-toast-close:hover {
  color: var(--color-text-strong);
}

/* 按鈕載入中與成功特效 */
.add-to-cart-btn-ajax {
  position: relative;
  transition: all 0.3s ease;
}

.add-to-cart-btn-ajax.loading {
  opacity: 0.6;
  pointer-events: none;
}

@keyframes popScale {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.add-to-cart-btn-ajax.added svg {
  animation: popScale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.add-to-cart-btn-ajax.added svg path {
  fill: var(--color-success) !important;
}

/* ========================================
   404 找不到頁面
   ======================================== */
.notfound-page {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 220px);
  padding: clamp(48px, 8vw, 90px) 20px 80px;
  background: var(--color-bg-grey, var(--color-bg-grey));
}
.notfound-inner {
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
}
.notfound-code {
  font-family: var(--font-primary);
  font-size: clamp(80px, 18vw, 160px);
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: 4px;
  margin: 0;
}
.notfound-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: var(--color-text-strong, var(--color-text-strong));
  margin: 12px 0 14px;
}
.notfound-text {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.9;
  color: var(--color-text-light, var(--color-text-muted));
  margin: 0 0 28px;
}
.notfound-search {
  display: flex;
  max-width: 440px;
  margin: 0 auto 24px;
  border: 1px solid var(--color-border, var(--color-border));
  border-radius: 100px;
  overflow: hidden;
  background: var(--color-white);
}
.notfound-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0 20px;
  height: 48px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text-strong);
  background: transparent;
}
.notfound-search-input::placeholder {
  color: var(--color-grey);
}
.notfound-search-btn {
  flex-shrink: 0;
  width: 56px;
  border: 0;
  background: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.notfound-search-btn:hover {
  background: var(--color-primary-dark);
}
.notfound-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.notfound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 48px;
  padding: 0 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.notfound-btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border: 1px solid var(--color-primary);
}
.notfound-btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
  opacity: 1;
}
.notfound-btn--secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-accent);
}
.notfound-btn--secondary:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
}
.notfound-popular {
  margin-top: 20px;
  text-align: center;
}
.notfound-popular-title {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  color: var(--color-text-strong, var(--color-text-strong));
  margin: 0 0 24px;
  display: inline-block;
}
.notfound-popular-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-accent, var(--color-accent));
  margin: 10px auto 0;
}
.notfound-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: left;
}
.notfound-products-grid .pl-image-box {
  height: auto;
  aspect-ratio: 1 / 1;
}
@media (max-width: 1024px) {
  .notfound-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .notfound-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .notfound-actions {
    flex-direction: column;
    align-items: center;
  }
  .notfound-btn {
    width: 100%;
    max-width: 280px;
  }
}

/* ==========================================
   圖位固定高度
   ==========================================
   圖位必須保留固定高度。原本 hero 與情境滿版圖是 height:auto，
   由圖片自身比例撐開 —— 尚未交圖時佔位圖很小，整個區塊會塌掉，
   換圖前後版面會位移，標記截圖也量不到正確位置。
   改為固定高度 + object-fit:cover，有沒有圖版面都一致。 */

/* home-1 主橫幅 */
.hero-image {
  height: 676px;
  object-fit: cover;
  object-position: center;
}

/* home-8 情境滿版圖：高度已在情境圖區塊統一處理（等比縮放），
   這裡不要再寫死 550px —— 它排在後面會蓋掉前面的 clamp()。 */

@media (max-width: 768px) {
  /* home-1-m 主橫幅（行動版） */
  .hero-mobile-inner {
    height: 223px;
    aspect-ratio: auto;
  }

  /* home-8-m 情境滿版圖（行動版） */
  .urban-outfit-mobile-inner {
    height: 280px;
    aspect-ratio: auto;
  }
}

/* ============================================================
   右下角浮動按鈕（template-parts/floating-buttons.php）
   ============================================================ */
.float-btns {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* 容器本身不擋點擊，只有按鈕本體可點 */
  pointer-events: none;
}

.float-btns-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* 收合動畫。用 max-height 而不是 height —— 按鈕數量由自訂器決定，
     寫死高度的話少填一顆就會留一段空白。 */
  max-height: 400px;
  opacity: 1;
  transition:
    max-height 0.3s ease,
    padding-top 0.3s ease,
    opacity 0.25s ease,
    transform 0.3s ease;
  transform: translateY(0);
  overflow: hidden;

  /* 收合動畫需要 overflow:hidden，但 .float-btn:hover 會往上移 3px、
     focus 外框還要再 3px —— 最上面那顆一 hover 就被這個裁切邊切掉頭。
     overflow 是裁在 padding box，所以留一點內距就有空間；
     再用等量的負 margin 抵銷，版面位置不變。 */
  padding-top: 8px;
  margin-top: -8px;
}

.float-btns.is-collapsed .float-btns-social {
  max-height: 0;
  /* 收合時內距也要收掉，否則 max-height 歸零後仍會留 8px 空隙 */
  padding-top: 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.float-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.float-btn svg {
  width: 100%;
  height: 100%;
  display: block;
}

.float-btn:hover {
  transform: translateY(-3px);
}

.float-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* 收合後的客服鍵。
   原本是 rotate(-180deg) —— 那是為了翻轉箭頭寫的，但這顆的圖是「耳機客服」，
   整顆轉 180 度就變成上下顛倒的人頭，美術回報的就是這個。
   改成左右鏡射：視覺上有變化、代表狀態切換，圖案本身不會倒過來。 */
.float-btns.is-collapsed .float-btn--support {
  transform: scaleX(-1);
}

.float-btns.is-collapsed .float-btn--support:hover {
  transform: scaleX(-1) translateY(3px);
}

/* 置頂鍵：捲動一段距離後才出現。
   灰底白箭頭。原圖是白色半透明底，在淺色頁面上等於看不見，
   所以底色改由這裡給；SVG 那層 rect 已改成透明。 */
.float-btn--top {
  background: var(--color-text-light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
}

.float-btn--top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.float-btn--top.is-visible:hover {
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .float-btns {
    right: 14px;
    bottom: 14px;
    gap: 10px;
  }

  .float-btns-social {
    gap: 10px;
  }

  .float-btn {
    width: 46px;
    height: 46px;
  }
}

/* ============================================================
   全站載入遮罩（加入購物車、商品載入時）
   由 assets/js/main.js 的 window.styluxLoading 控制
   ============================================================ */
.stylux-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.stylux-loading.is-active {
  opacity: 1;
  visibility: visible;
}

.stylux-loading-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  /* 圓環底色淡、上緣用品牌主色 —— 轉起來才看得出方向 */
  border: 4px solid color-mix(in srgb, var(--color-white) 45%, transparent);
  border-top-color: var(--color-primary);
  animation: styluxSpin 0.8s linear infinite;
}

@keyframes styluxSpin {
  to {
    transform: rotate(360deg);
  }
}

/* 系統設定關閉動畫時不要轉，改用淡入淡出提示忙碌中 */
@media (prefers-reduced-motion: reduce) {
  .stylux-loading-spinner {
    animation: styluxPulse 1.2s ease-in-out infinite;
  }

  @keyframes styluxPulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.35;
    }
  }
}
