/* ==========================================================================
   愛色智能印刷 — 版面層
   公告列、頁首（sticky-shrink）、主選單與大型下拉、輪播、促銷卡、分類入口、
   頁尾、浮動元件
   斷點：549 / 849 / 1079 / 1280（spec §6）
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 公告列
   深藍 #006FA8 底、白字（對比 5.47）、12px
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--btn-blue);
  color: #fff;
  font-size: var(--fs-topbar);
  line-height: 1.5;
  overflow: hidden;
  transition: height var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  height: var(--header-topbar-h);
}

.topbar__promo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.topbar__promo-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   促銷跑馬燈
   文字要比視窗寬才看得出在跑，所以視窗固定 220px（實測文字寬 222px）。
   內容複製兩份、靠 translateX(-50%) 無縫接回；.marquee__item 的 padding-right
   就是接縫間距，兩邊等寬所以 -50% 會剛好接上。
   -------------------------------------------------------------------------- */
.marquee {
  display: inline-block;
  text-decoration: none;
}

.marquee:hover,
.marquee:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.marquee__viewport {
  display: block;
  width: 220px;
  max-width: 100%;
  overflow: hidden;
  /* 兩端淡出，讓文字滑進滑出時不會看起來被切掉 */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 12s linear infinite;
}

.marquee__item {
  padding-right: 34px;
  white-space: nowrap;
}

/* 滑鼠移入或鍵盤 focus 時停下來，讓人有時間把它點掉 */
.marquee:hover .marquee__track,
.marquee:focus-visible .marquee__track {
  animation-play-state: paused;
}

/* 捲動後 topbar 收起來了，動畫沒必要繼續跑 */
.header.is-shrunk .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }

  /* 不動的時候就不需要淡出效果，直接顯示 */
  .marquee__viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 767px) {
  .marquee__viewport {
    width: auto;
  }
}


.topbar__link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.topbar__link:hover {
  color: #fff;
  text-decoration-thickness: 2px;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex: none;
}

.topbar__group {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

@media (max-width: 849px) {
  .topbar__group--secondary {
    display: none;
  }
}

@media (max-width: 549px) {
  .topbar__inner {
    justify-content: center;
  }
  .topbar__tools {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   2. 頁首
   總高 113px（公告 38 + 主選單 75）。捲動後壓到 60px，只留主選單。
   漸層 #F6F9FA → #ECF1F3 + 下緣 1px 髮絲線
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(
    to bottom,
    var(--header-bg-hi),
    var(--header-bg)
  );
  border-bottom: 1px solid var(--header-line);
  transition: box-shadow var(--t-slow) var(--ease);
}

.header__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
  height: var(--header-nav-h);
  transition: height var(--t-slow) var(--ease);
}

/* 捲動後：公告列收起、主選單列壓低、加陰影 */
.header.is-shrunk {
  box-shadow: var(--shadow-header-shrink);
}

.header.is-shrunk .topbar {
  height: 0;
  opacity: 0;
}

.header.is-shrunk .header__bar {
  height: var(--header-h-shrink);
}

@media (prefers-reduced-motion: reduce) {
  .header.is-shrunk .topbar {
    display: none;
  }
}

/* 2a. Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}

/* 正式 logo：assets/img/acee-logo.png（779x434，透明背景，滿版無留白）
   用高度當尺寸、寬度自動，才不會在不同視窗寬度下糊掉或留白。 */
.logo__img {
  display: block;
  width: auto;
  height: 42px;
  max-width: none;
}

@media (max-width: 767px) {
  .logo__img {
    height: 34px;
  }
}

.logo__img--footer {
  height: 46px;
}

.logo__img--drawer {
  height: 38px;
}

@media (prefers-reduced-motion: no-preference) {
  .logo__img {
    transition: height var(--t-slow) var(--ease);
  }
}

.header.is-shrunk .logo__img {
  height: 32px;
}

@media (max-width: 767px) {
  .header.is-shrunk .logo__img {
    height: 28px;
  }
}

/* 舊的文字 logo（logo__mark / logo__text / logo__name / logo__tag）已隨
   assets/img/acee-logo.png 一起下線，這裡只留圖片版需要的樣式。 */


/* 2b. 主選單 */
.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  height: 100%;
}

.nav__item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  height: 100%;
  padding: 0 var(--sp-4);
  color: var(--header-fg);
  transition: color var(--t-slow) var(--ease);
}

.nav__zh {
  font-size: var(--fs-nav-zh);
  font-weight: var(--fw-medium);
  line-height: 1.3;
}

.nav__en {
  font-size: var(--fs-nav-en);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  letter-spacing: var(--tracking-en);
  text-transform: uppercase;
  color: var(--btn-blue);
  transition: color var(--t-slow) var(--ease);
}

/* 滑過：中文變亮藍，下方出 2px 亮藍底線 */
.nav__link::after {
  content: "";
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform var(--t-slow) var(--ease);
}

@media (hover: hover) {
  .nav__item:hover .nav__link,
  .nav__item:focus-within .nav__link {
    color: var(--brand);
  }
  .nav__item:hover .nav__link::after,
  .nav__item:focus-within .nav__link::after {
    transform: scaleX(1);
  }
}

.nav__link[aria-current="page"] {
  color: var(--brand);
}

.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__caret {
  width: 12px;
  height: 12px;
  margin-top: -2px;
  color: var(--header-muted);
  transition: transform var(--t-base) var(--ease);
}

.nav__item:hover .nav__caret {
  transform: rotate(180deg);
}

/* 2c. 大型下拉選單（含分類圖片） */
.mega {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 90;
  width: max(680px, 92vw);
  transform: translate(-50%, -8px);
  padding: var(--sp-7);
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--r-card) var(--r-card);
  box-shadow: var(--shadow-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease), visibility var(--t-slow);
}

/* 桌機用 hover，觸控與鍵盤用 .is-open（由 site.js 控制） */
@media (hover: hover) and (min-width: 1080px) {
  .nav__item:hover .mega,
  .nav__item:focus-within .mega,
  .nav__item.is-open .mega {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

.nav__item.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.mega__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 240px;
  gap: var(--sp-7);
}

/* SHOPPING mega 有 4 個 list group（無 promo）— 寫成一張紧凑的列表 */
.mega--shop {
  /* clamp 鎖住大小：min 400、偏好 60vw、max 480。桌機約 480，控在桌機 viewport 1/2 以下 */
  width: clamp(400px, 60vw, 480px);
  padding: var(--sp-3);
  /* 不要置中（會被左半邊切）— 靠近 SHOPPING link 左邊對齊、往右展開 */
  left: 0 !important;
  transform: translate(0, -8px) !important;
}
.mega--shop .mega__inner {
  display: grid;
  /* 「全部 → 前往商城」已搬到 mega 頂端當 top CTA，
     inner 剩下「依種類 / 依功能 / 其它」3 欄。 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
}
.nav__item--has-mega:hover .mega--shop,
.nav__item.is-open .mega--shop,
.nav__item:focus-within .mega--shop,
.nav__item:hover .mega--shop {
  transform: translate(0, 0) !important;
}

/* 印東西 / 下載中心 / 教學 / 關於四個 mega 都是「2 list」兩欄，
   用同一組「不置中 + clamp 鎮大小」規則。promo 都拿掉了。 */
.mega--print,
.mega--downloads,
.mega--learn,
.mega--about {
  width: clamp(440px, 55vw, 520px);
  padding: var(--sp-4);
  left: 0 !important;
  transform: translate(0, -8px) !important;
}
/* hover / is-open / focus-within 全加上，保險防 transform(-50%) 攔不到 */
.nav__item:hover .mega--print,
.nav__item:hover .mega--downloads,
.nav__item:hover .mega--learn,
.nav__item:hover .mega--about,
.nav__item--has-mega:hover .mega--print,
.nav__item--has-mega:hover .mega--downloads,
.nav__item--has-mega:hover .mega--learn,
.nav__item--has-mega:hover .mega--about,
.nav__item.is-open .mega--print,
.nav__item.is-open .mega--downloads,
.nav__item.is-open .mega--learn,
.nav__item.is-open .mega--about,
.nav__item:focus-within .mega--print,
.nav__item:focus-within .mega--downloads,
.nav__item:focus-within .mega--learn,
.nav__item:focus-within .mega--about {
  transform: translate(0, 0) !important;
}

/* PRINTING / DOWNLOADS / LEARN / ABOUT 四個 mega 都拿掉 promo 區塊了，
   所以 inner grid 覆寫為 2 平欄，避免被 base 的「1fr 1fr 240px」叫一個空的 240px 第三欄。 */
.mega--print .mega__inner,
.mega--downloads .mega__inner,
.mega--learn .mega__inner,
.mega--about .mega__inner {
  grid-template-columns: 1fr 1fr;
}

/* PRINTING mega「線上下單 →」與 SHOPPING mega「前往商城 →」，兩顆都是
   mega 最頂端的 primary CTA：藍底白字、整條 span 全寬、放在 .mega__inner 之前。 */
.mega--print .mega__top-cta,
.mega--shop .mega__top-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: var(--sp-4);
  background: var(--btn-blue, #006FA8);
  color: #fff;
  font-weight: var(--fw-bold, 700);
  font-size: 16px;
  text-decoration: none;
  letter-spacing: 0.02em;
  border-radius: var(--r-btn, 4px);
  transition: background var(--t-fast, 150ms) var(--ease, ease);
}
.mega--print .mega__top-cta:hover,
.mega--print .mega__top-cta:focus-visible,
.mega--shop .mega__top-cta:hover,
.mega--shop .mega__top-cta:focus-visible {
  background: var(--btn-blue-hover, #005A88);
  color: #fff;
}

.mega__group-title {
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border-soft);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-en);
  text-transform: uppercase;
  color: var(--muted);
}

.mega__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 6px 8px;
  border-radius: var(--r-btn);
  font-size: var(--fs-body-system);
  color: var(--fg-2);
  transition: background-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease);
}

.mega__list a:hover {
  background: var(--info-bg);
  color: var(--btn-blue);
}

.mega__list a span:last-child {
  font-family: var(--font-num);
  font-size: var(--fs-small);
  color: var(--muted);
}

.mega__promo {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border-radius: var(--r-card);
  background: var(--promo-bg);
  border: 1px solid var(--promo-line);
}

.mega__promo-title {
  font-size: var(--fs-body-system);
  font-weight: var(--fw-bold);
  color: var(--fg);
  line-height: var(--lh-snug);
}

.mega__promo-text {
  font-size: var(--fs-small);
  color: var(--fg-2);
}

.mega__promo .ph-img {
  border-radius: var(--r-btn);
  aspect-ratio: 16 / 9;
}

/* 2d. 工具區（搜尋、會員、購物車、活動） */
.header__tools {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
  flex: none;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search__input {
  width: 190px;
  height: 38px;
  padding: 0 34px 0 12px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-size: var(--fs-body-system);
  color: var(--fg);
  transition: width var(--t-base) var(--ease),
    background-color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}

.search__input::placeholder {
  color: var(--muted);
}

.search__input:hover {
  background: var(--bg);
  border-color: var(--border);
}

.search__input:focus {
  background: var(--bg);
  border-color: var(--btn-blue);
  outline: none;
  box-shadow: var(--focus-ring-blue);
}

.search__submit {
  position: absolute;
  right: 2px;
  top: 2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-btn);
  color: var(--header-fg);
  transition: background-color var(--t-base) var(--ease);
}

.search__submit:hover {
  background: rgba(0, 0, 0, 0.06);
}

@media (min-width: 1281px) {
  .search__input {
    width: 230px;
  }
}

@media (max-width: 1079px) {
  .search__input {
    width: 150px;
  }
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-btn);
  color: var(--header-fg);
  transition: background-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease);
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--brand-ink);
}

.icon-btn__label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: var(--r-btn);
  background: var(--btn-ink);
  font-size: 11px;
  line-height: 1.5;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}

.icon-btn:hover .icon-btn__label {
  opacity: 1;
}

.icon-btn__badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--danger);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: var(--fw-bold);
  color: #fff;
}

.icon-btn__badge.is-on {
  display: flex;
}

/* 活動圖示按鈕（插圖風格） */
.promo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--promo-line);
  border-radius: var(--r-pill);
  background: var(--promo-bg);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--warn);
  white-space: nowrap;
  transition: background-color var(--t-base) var(--ease);
}

.promo-pill:hover {
  background: #fdefae;
  color: var(--warn);
}

.promo-pill__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--r-float);
  background: var(--danger);
}

@media (max-width: 1079px) {
  .promo-pill span:not(.promo-pill__dot) {
    display: none;
  }
  .promo-pill {
    width: 38px;
    justify-content: center;
    padding: 0;
  }
}

/* 2e. 漢堡（≤849px） */
.burger {
  display: none;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r-btn);
  color: var(--header-fg);
}

.burger:hover {
  background: rgba(0, 0, 0, 0.06);
}

.burger__lines {
  position: relative;
  width: 20px;
  height: 14px;
}

.burger__lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease),
    opacity var(--t-base) var(--ease);
}

.burger__lines span:nth-child(1) {
  top: 0;
}
.burger__lines span:nth-child(2) {
  top: 6px;
}
.burger__lines span:nth-child(3) {
  top: 12px;
}

.burger[aria-expanded="true"] .burger__lines span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.burger[aria-expanded="true"] .burger__lines span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] .burger__lines span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 849px) {
  .burger {
    display: grid;
  }
  .nav,
  .promo-pill {
    display: none;
  }
  .search,
  .header__go {
    display: none;
  }
  /* Logo 置中（僅限頁首，頁尾與抽屜的 logo 要留在正常版面） */
  .header__bar {
    justify-content: space-between;
    gap: var(--sp-3);
  }
  .header .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   3. 手機選單抽屜（≤849px）
   -------------------------------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  visibility: hidden;
  pointer-events: none;
}

.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.drawer.is-open .drawer__scrim {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(340px, 88vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateX(-100%);
  transition: transform var(--t-base) var(--ease);
  overscroll-behavior: contain;
}

.drawer.is-open .drawer__panel {
  transform: translateX(0);
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-soft);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-2) 0 var(--sp-9);
}

.drawer__foot {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.drawer__search {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-soft);
}

.drawer__search .input {
  height: 40px;
}

.acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  font-size: var(--fs-nav-zh);
  font-weight: var(--fw-medium);
  color: var(--header-fg);
}

.acc__btn:hover {
  background: var(--header-bg);
}

.acc__en {
  display: block;
  font-size: var(--fs-nav-en);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-en);
  text-transform: uppercase;
  color: var(--btn-blue);
}

.acc__caret {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--header-muted);
  transition: transform var(--t-base) var(--ease);
}

.acc__btn[aria-expanded="true"] .acc__caret {
  transform: rotate(180deg);
}

.acc__panel {
  display: none;
  padding: 0 var(--sp-5) var(--sp-4) var(--sp-7);
  background: var(--header-bg);
}

.acc__panel.is-open {
  display: block;
}

.acc__panel a {
  display: block;
  padding: 7px 0;
  font-size: var(--fs-body-system);
  color: var(--fg-2);
}

.acc__panel a:hover {
  color: var(--btn-blue);
}

@media (min-width: 850px) {
  .drawer {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   4. 主視覺輪播
   滿版寬，比例約 2.5 : 1，下方圓點指示器。
   箭頭滑過輪播區才出現（opacity .7），滑到箭頭變 1。
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(
    to bottom,
    var(--hero-grad-top) 0,
    var(--hero-grad-bot) 320px
  );
  border-bottom: 1px solid var(--border-soft);
}

.hero__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 2;
  min-height: 260px;
  max-height: 574px;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-slow) var(--ease-io),
    visibility var(--t-slow) var(--ease-io);
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero__slide .ph-img {
  width: 100%;
  height: 100%;
  border: 0;
  aspect-ratio: auto;
}

/* 正式橫幅圖：跟 .ph-img 一樣鋪滿輪播格，只是換成真的照片 */
.hero__slide .hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  aspect-ratio: auto;
}

/* 照片本身已經有標題與文案，CTA 靠下方左側疊上去，不要再放一張卡片擋圖 */
.hero__slide--image {
  /* 橫幅底色是米白 #fdfbf5，contain 留白時用同色，看不出來 */
  background: #fdfbf5;
}

/* 圖片左下較亮時，疊一層由下往上的輕漸層讓 CTA 按鈕清楚 */
.hero__slide--image--overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
  pointer-events: none;
}

.hero__slide--image .crystal-hero__picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__slide--image .hero__content {
  align-items: flex-end;
  padding-bottom: 6%;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.hero__slide--image .hero__content a {
  pointer-events: auto;
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero__content-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero__card {
  max-width: 480px;
  padding: var(--sp-7);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  box-shadow: var(--shadow-modal);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-en);
  text-transform: uppercase;
  color: var(--brand);
}

.hero__eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--brand);
}

.hero__title {
  margin-block: 0 var(--sp-3);
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  letter-spacing: var(--tracking-display);
  color: var(--fg);
}

.hero__text {
  margin-bottom: var(--sp-5);
  font-size: var(--fs-body-marketing);
  color: var(--fg-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* 輪播上的 CTA 疊在照片上，點擊目標不能比選單／浮動圓鈕小 */
.hero__actions .btn {
  min-height: 44px;
}

.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-float);
  background: var(--bg);
  box-shadow: var(--shadow-float);
  color: var(--fg-2);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease),
    color var(--t-base) var(--ease), transform var(--t-fast) var(--ease);
}

.hero__nav--prev {
  left: var(--sp-5);
}

.hero__nav--next {
  right: var(--sp-5);
}

.hero:hover .hero__nav,
.hero__nav:focus-visible {
  opacity: 0.7;
}

.hero__nav:hover {
  opacity: 1;
  color: var(--brand);
}

.hero__nav:active {
  transform: translateY(-50%) scale(0.94);
}

.hero__dots {
  position: absolute;
  left: 50%;
  bottom: var(--sp-5);
  transform: translateX(-50%);
  display: flex;
  gap: var(--sp-2);
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-float);
}

.hero__dot {
  width: 9px;
  height: 9px;
  border-radius: var(--r-float);
  background: rgba(0, 111, 168, 0.35);
  transition: background-color var(--t-base) var(--ease),
    width var(--t-base) var(--ease);
}

.hero__dot[aria-selected="true"] {
  width: 22px;
  background: var(--btn-blue);
}

@media (max-width: 849px) {
  .hero__nav {
    display: none;
  }
  .hero__card {
    max-width: 100%;
    padding: var(--sp-5);
  }
  .hero__content {
    align-items: flex-end;
    padding-bottom: var(--sp-11);
  }
  .hero__text {
    display: none;
  }
}

@media (max-width: 549px) {
  .hero__viewport {
    aspect-ratio: 4 / 3;
  }
  /* 手機不要裁橫幅：左邊是標題、右邊是商品圖，兩邊都不能切。
     4:3 的框比 5:2 圖高，多出來的米白帶正好放 CTA。 */
  .hero__slide--image .hero__img {
    object-fit: contain;
  }
  .hero__title {
    font-size: 20px;
  }
  .hero__actions .btn {
    flex: 1;
  }
}

/* 內容頁的頁首圖：跟首頁 hero 用同一套比例與響應式規則，
   免得同一張圖在兩個地方長得不一样。 */
.page-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  margin-bottom: var(--sp-7);
  border-radius: var(--r-card);
  background: #fdfbf5;
}

.page-banner__img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 849px) {
  .page-banner {
    aspect-ratio: 4 / 3;
  }
  /* 內容頁沒有疊在圖上的 CTA，就直接完整顯示、不要裁 */
  .page-banner__img {
    object-fit: contain;
  }
}

/* --------------------------------------------------------------------------
   4a. 信任列（Hero 之下、分類之上）
   4 個徽章，桌機單列；手機 2×2。
   -------------------------------------------------------------------------- */
.trust {
  background: radial-gradient(
      120% 160% at 12% -10%,
      rgba(255, 255, 255, 0.18),
      transparent 55%
    ),
    linear-gradient(
      135deg,
      var(--brand) 0%,
      var(--btn-blue) 55%,
      var(--btn-blue-hover) 100%
    );
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.trust__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
  padding-block: var(--sp-7);
}

/* 玻璃感文字塊：白 22%→12% + 1px 半透明白邊 + 柔外陰影 + 內側亮線 */
.trust__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0.12)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform var(--t-base) var(--ease),
    background var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

.trust__item.is-active {
  z-index: 2;
  transform: scale(1.06) translateY(-3px);
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0.2)
  );
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

@media (hover: hover) {
  .trust__item:hover {
    z-index: 2;
    transform: scale(1.06) translateY(-3px);
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.34),
      rgba(255, 255, 255, 0.2)
    );
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
  }
}

.trust__icon {
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
}

.trust__icon svg {
  width: 20px;
  height: 20px;
}

.trust__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.trust__title {
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: #fff;
}

.trust__note {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.72);
  line-height: var(--lh-snug);
}

@media (max-width: 849px) {
  .trust__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-4) var(--sp-5);
  }
}

@media (max-width: 549px) {
  .trust__row {
    padding-block: var(--sp-5);
  }
}

/* --------------------------------------------------------------------------
   4b. 品牌故事（about 頁主視覺）
   編輯雜誌式三章節，三句重點各就各位。
   -------------------------------------------------------------------------- */
.brand-story {
  --bs-col: 720px;
  --bs-pad: 56px;
}

@media (min-width: 850px) {
  .brand-story {
    --bs-pad: 96px;
  }
}

.brand-story__hero {
  padding-block: var(--bs-pad) calc(var(--bs-pad) * 0.75);
  text-align: center;
  background: var(--info-bg);
  border-bottom: 1px solid var(--border-soft);
}

.brand-story__hero-inner {
  max-width: 880px;
  margin-inline: auto;
}

.brand-story__hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-en);
  text-transform: uppercase;
  color: var(--brand);
}

.brand-story__hero-eyebrow::before,
.brand-story__hero-eyebrow::after {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--brand);
}

.brand-story__hero-eyebrow::before {
  margin-right: var(--sp-1);
}

.brand-story__hero-quote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 52px);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  letter-spacing: var(--tracking-display);
  color: var(--fg);
}


.brand-story__hero-quote--second {
  display: block;
  line-height: 1.38;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.brand-story__hero-quote--split {
  line-height: 1.35;
}

.brand-story__hero-climax {
  display: block;
  margin-top: var(--sp-5);
  color: var(--brand);
  font-size: 1.15em;
  letter-spacing: 0.1em;
  line-height: 1.35;
}

@media (max-width: 549px) {
  .brand-story__hero-climax,
  .climax__quote-climax {
    font-size: 1em;
    letter-spacing: 0.05em;
  }
}

.brand-story__hero-rule {
  width: 40px;
  height: 2px;
  margin: var(--sp-7) auto 0;
  background: var(--brand);
}

.chapter {
  position: relative;
  max-width: var(--bs-col);
  margin-inline: auto;
  padding-block: var(--bs-pad);
  padding-inline: var(--gutter);
}

.chapter + .chapter {
  border-top: 1px solid var(--border-soft);
}

.chapter--cool {
  background: var(--info-bg);
}

.chapter--neutral {
  background: var(--bg);
}

.chapter__head {
  margin-bottom: var(--sp-7);
}

.chapter__num-bg {
  position: absolute;
  top: -8px;
  right: var(--gutter);
  font-family: var(--font-display);
  font-size: 140px;
  font-weight: var(--fw-bold);
  line-height: 1;
  color: rgba(0, 160, 233, 0.08);
  letter-spacing: 0;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.chapter__head,
.chapter__body {
  position: relative;
  z-index: 1;
}

@media (max-width: 549px) {
  .chapter__num-bg {
    font-size: 90px;
    top: -4px;
  }
}

.chapter__label {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
  color: var(--brand);
  line-height: 1.2;
}

.chapter__body {
  font-size: var(--fs-body-marketing);
  line-height: var(--lh-body);
  color: var(--fg-2);
}

.chapter__body > * + * {
  margin-top: var(--sp-4);
}

.chapter__body > p:first-child::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 0.85;
  font-weight: var(--fw-bold);
  color: var(--brand);
  margin: 8px 12px 0 0;
  letter-spacing: 0;
}

@media (max-width: 549px) {
  .chapter__body > p:first-child::first-letter {
    font-size: 56px;
    margin: 4px 10px 0 0;
  }
}

.chapter__body .hl {
  background: linear-gradient(transparent 62%, var(--promo-bg) 62%);
  padding: 0 2px;
  color: var(--fg);
  font-weight: var(--fw-medium);
  border-radius: 1px;
}

.chapter__lead {
  margin-block: 0 0 var(--sp-6);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  letter-spacing: var(--tracking-display);
  color: var(--brand);
}

.pull-quote {
  margin-block: var(--sp-8);
  padding: var(--sp-6) var(--sp-7);
  border-left: 4px solid var(--brand);
  background: var(--info-bg);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: var(--fw-bold);
  line-height: 1.5;
  letter-spacing: var(--tracking-display);
  color: var(--brand-ink);
}

.pull-quote--alt {
  background: transparent;
  border-left-color: var(--accent);
  color: var(--fg);
}

.climax {
  padding-block: calc(var(--bs-pad) * 1.25);
  text-align: center;
  background: var(--info-bg);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.climax__inner {
  max-width: 880px;
  margin-inline: auto;
}

.climax__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-en);
  text-transform: uppercase;
  color: var(--brand);
}

.climax__eyebrow::before,
.climax__eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brand);
}

.climax__quote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 56px);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  letter-spacing: var(--tracking-display);
  color: var(--fg);
}

.climax__quote--split {
  line-height: 1.35;
  text-align: left;
}

.climax__quote-climax {
  display: block;
  margin-top: var(--sp-5);
  color: var(--brand);
  font-size: 1.15em;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .brand-story__hero-quote,
  .pull-quote,
  .climax__quote {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  }
  .brand-story__hero.is-in .brand-story__hero-quote,
  .chapter.is-in .pull-quote,
  .climax.is-in .climax__quote {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   5. 主打套餐：兩張並排活動卡，粗外框 + 緞帶標題
   -------------------------------------------------------------------------- */
.promo-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-7);
}

.promo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--brand);
  border-radius: var(--r-card);
  background: var(--bg);
  overflow: hidden;
  transition: transform var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease);
}

.promo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.promo-card--alt {
  border-color: var(--accent);
}

/* 緞帶標題 */
.ribbon {
  position: absolute;
  top: var(--sp-5);
  left: -3px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 12px;
  background: var(--btn-blue);
  color: #fff;
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.promo-card--alt .ribbon {
  background: var(--warn);
  color: #fff;
}

.ribbon__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: var(--r-float);
  background: #fff;
}

.promo-card__media .ph-img {
  border: 0;
  border-bottom: 3px solid currentColor;
  aspect-ratio: 16 / 9;
}

.promo-card--alt .promo-card__media {
  color: var(--accent);
}

.promo-card:not(.promo-card--alt) .promo-card__media {
  color: var(--brand);
}

.promo-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
}

.promo-card__title {
  font-size: var(--fs-subtitle);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--fg);
}

.promo-card__text {
  font-size: var(--fs-body-system);
  color: var(--fg-2);
}

.promo-card__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fs-body-system);
  color: var(--fg-2);
}

.promo-card__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.promo-card__list li::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  margin-top: 9px;
  border-radius: var(--r-float);
  background: var(--btn-blue);
}

.promo-card--alt .promo-card__list li::before {
  background: var(--warn);
}

.promo-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-4);
}

.promo-card__from {
  font-size: var(--fs-small);
  color: var(--muted);
}

.promo-card__amount {
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: var(--fw-bold);
  color: var(--fg);
  letter-spacing: 0;
}

.promo-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

@media (max-width: 849px) {
  .promo-pair {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   6. 活動橫幅：大圖 + 兩張並排子圖
   -------------------------------------------------------------------------- */
.banner-stack {
  display: grid;
  gap: var(--sp-6);
}

.banner-stack__main .ph-img {
  aspect-ratio: 1160 / 300;
}

.banner-stack__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-6);
}

.banner-stack__row .ph-img {
  aspect-ratio: 570 / 250;
}

@media (max-width: 849px) {
  .banner-stack__row {
    grid-template-columns: 1fr;
  }
  .banner-stack__main .ph-img,
  .banner-stack__row .ph-img {
    aspect-ratio: 16 / 9;
  }
}

/* --------------------------------------------------------------------------
   7. 分類入口：左右兩區塊（代工／商品），區塊內卡片垂直堆疊
   -------------------------------------------------------------------------- */
.cat-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.cat-block__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
}

.cat-block__title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: var(--r-pill);
  background: var(--brand);
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 160, 233, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(234, 246, 253, 0.30)),
    rgba(234, 246, 253, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--fg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}

.cat-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 120px at 0% 50%, rgba(0, 160, 233, 0.14), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}

.cat-tile:hover {
  transform: translateX(4px);
  border-color: rgba(0, 160, 233, 0.45);
  box-shadow: 0 10px 24px rgba(12, 74, 96, 0.14);
}

.cat-tile:hover::before {
  opacity: 1;
}

.cat-tile:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-blue);
}

.cat-tile__icon {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.cat-tile__icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transition: transform var(--t-base) var(--ease);
}

.cat-tile:hover .cat-tile__icon img {
  transform: translateY(-2px);
}

.cat-tile__text {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cat-tile__label {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--fg);
  transition: color var(--t-base) var(--ease);
}

.cat-tile__sub {
  position: relative;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  transition: color var(--t-base) var(--ease);
}

.cat-tile:hover .cat-tile__label {
  color: var(--btn-blue);
}

.cat-tile:hover .cat-tile__sub {
  color: var(--fg-2);
}

@media (max-width: 849px) {
  .cat-blocks {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 549px) {
  .cat-tile__icon img {
    width: 56px;
    height: 56px;
  }
  .cat-tile__label {
    font-size: 14px;
  }
}

/* --------------------------------------------------------------------------
   8. 雙軌分流（我要代工／我要買設備耗材）
   首頁最重要的入口，放在輪播正下方。
   -------------------------------------------------------------------------- */
.split-cta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
}

.split-cta__item {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  color: var(--fg-2);
  transition: border-color var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.split-cta__item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.split-cta__num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--r-btn);
  background: var(--info-bg);
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: var(--fw-bold);
  color: var(--btn-blue);
}

.split-cta__item--alt .split-cta__num {
  background: var(--promo-bg);
  color: var(--warn);
}

.split-cta__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.split-cta__title {
  font-size: var(--fs-subtitle);
  font-weight: var(--fw-bold);
  color: var(--fg);
}

.split-cta__desc {
  font-size: var(--fs-body-system);
}

.split-cta__go {
  margin-left: auto;
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--btn-blue);
  transition: transform var(--t-base) var(--ease);
}

.split-cta__item:hover .split-cta__go {
  transform: translateX(3px);
}

@media (max-width: 549px) {
  .split-cta {
    grid-template-columns: 1fr;
  }
  .split-cta__item {
    padding: var(--sp-4);
    gap: var(--sp-4);
  }
  .split-cta__go {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   9. 服務流程條（三步驟）
   -------------------------------------------------------------------------- */
.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
  counter-reset: flow;
}

.flow__item {
  position: relative;
  padding: var(--sp-6);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
}

.flow__item::before {
  counter-increment: flow;
  content: counter(flow, decimal-leading-zero);
  display: block;
  margin-bottom: var(--sp-2);
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: var(--fw-bold);
  letter-spacing: 0;
  color: var(--brand);
}

.flow__title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-subtitle);
  font-weight: var(--fw-medium);
  color: var(--fg);
}

.flow__desc {
  font-size: var(--fs-body-system);
  color: var(--fg-2);
}

@media (max-width: 849px) {
  .flow {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   10. 頁尾
   5 欄連結（關於、新手選購、購物說明、小幫手、聯絡我們）+ LINE + 社群 + 付款
   -------------------------------------------------------------------------- */
.footer {
  margin-top: var(--sp-12);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer__cols {
  display: grid;
  grid-template-columns: 1.5fr repeat(5, 1fr);
  gap: var(--sp-7) var(--sp-5);
  padding-block: var(--sp-11) var(--sp-9);
}

.footer__col-title {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-body-system);
  font-weight: var(--fw-bold);
  color: var(--fg);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer__list a {
  font-size: var(--fs-body-system);
  color: var(--fg-2);
}

.footer__list a:hover {
  color: var(--btn-blue);
}

.footer__about-text {
  margin-top: var(--sp-4);
  font-size: var(--fs-body-system);
  line-height: 1.7;
  color: var(--fg-2);
}

/* 品牌區聯絡資訊：左側標籤、右側數值對齊成兩欄，避免隨意斷行 */
.footer__contact {
  margin-top: var(--sp-5);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 6px var(--sp-3);
  font-size: var(--fs-body-system);
  color: var(--fg-2);
}

.footer__contact-row {
  display: contents;
}

.footer__contact-label {
  font-size: var(--fs-small);
  color: var(--muted);
  white-space: nowrap;
}

.footer__contact-phone {
  font-family: var(--font-num);
  font-size: var(--fs-price);
  font-weight: var(--fw-bold);
  color: var(--fg);
  letter-spacing: 0;
  white-space: nowrap;
}

.footer__contact-hours {
  word-break: keep-all;
}

.footer__contact-note {
  grid-column: 2;
  font-size: var(--fs-small);
  color: var(--muted);
}

.footer__bar {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-page);
}

.footer__bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-block: var(--sp-5);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-size: var(--fs-small);
  color: var(--muted);
}

.footer__legal a {
  color: var(--muted);
}

.footer__legal a:hover {
  color: var(--btn-blue);
}

.footer__copyright {
  margin-top: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--muted);
}

.footer__pay {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.footer__pay-label {
  font-size: var(--fs-small);
  color: var(--muted);
}

.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--fg-2);
  white-space: nowrap;
}

.pay-chip svg {
  width: 14px;
  height: 14px;
  color: var(--btn-blue);
}

.footer__social {
  display: flex;
  gap: var(--sp-1);
  margin-top: var(--sp-5);
}

.social-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--fg-2);
  transition: opacity var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}

.social-btn:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

/* 頁尾社群：無外框，只留官方品牌識別 logo（LINE 綠／Facebook 藍／Instagram 桃紅／YouTube 紅） */
.social-btn[aria-label^="LINE"] {
  color: var(--line-green);
}

.social-btn[aria-label="Facebook"] {
  color: #0866FF;
}

.social-btn[aria-label="Instagram"] {
  color: #E4405F;
}

.social-btn[aria-label^="YouTube"] {
  color: #FF0000;
}

/* 四個社群圖示統一尺寸：無外框，圖示放大 */
.social-btn svg {
  width: 36px;
  height: 36px;
}

@media (max-width: 1079px) {
  .footer__cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 549px) {
  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-block: var(--sp-9) var(--sp-7);
  }
  .footer__bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   11. 浮動元件
   右下圓形按鈕（LINE 聊聊）、底部登入提示條
   -------------------------------------------------------------------------- */
.float {
  position: fixed;
  right: var(--sp-6);
  bottom: var(--sp-6);
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-end;
}

.float__btn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-float);
  background: var(--line-green);
  box-shadow: 0 10px 24px -10px rgba(6, 199, 85, 0.75);
  color: #fff;
  transition: transform var(--t-base) var(--ease),
    background-color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

.float__btn:hover {
  transform: translateY(-2px);
  background: var(--line-green-hover);
  color: #fff;
  box-shadow: 0 14px 28px -10px rgba(6, 199, 85, 0.85);
}

.float__btn:active {
  transform: translateY(0) scale(0.96);
  background: var(--line-green-hover);
  color: #fff;
}

.float__btn svg {
  width: 26px;
  height: 26px;
}

.float__label {
  position: absolute;
  right: calc(100% + 8px);
  padding: 4px 10px;
  border-radius: var(--r-btn);
  background: var(--btn-ink);
  font-size: var(--fs-small);
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}

.float__btn:hover .float__label {
  opacity: 1;
}

/* 回到頂端：捲動後才出現 */
.float__top {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-float);
  background: var(--bg);
  box-shadow: var(--shadow-float);
  color: var(--fg-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--t-base) var(--ease),
    transform var(--t-base) var(--ease), visibility var(--t-base);
}

.float__top.is-on {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.float__top:hover {
  color: var(--brand);
}

.float__top svg {
  width: 18px;
  height: 18px;
}

/* 底部登入提示條：深色底 + 金黃「立即登入」 */
.loginbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 96;
  background: var(--fg);
  color: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform var(--t-slow) var(--ease);
}

.loginbar.is-on {
  transform: translateY(0);
}

.loginbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  padding-block: var(--sp-3);
}

.loginbar__text {
  font-size: var(--fs-body-system);
  line-height: 1.5;
}

.loginbar__text strong {
  color: var(--accent);
  font-weight: var(--fw-bold);
}

.loginbar__close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--r-btn);
  color: rgba(255, 255, 255, 0.72);
}

.loginbar__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.loginbar__close svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 549px) {
  .float {
    right: var(--sp-4);
    bottom: 76px;
  }
  .loginbar__inner {
    flex-wrap: wrap;
    gap: var(--sp-3);
    padding-block: var(--sp-3) var(--sp-4);
  }
  .loginbar__text {
    font-size: var(--fs-small);
    text-align: center;
  }
}

/* 登入提示條出現時，浮動鈕往上讓位 */
body.has-loginbar .float {
  bottom: 84px;
}

@media (max-width: 549px) {
  body.has-loginbar .float {
    bottom: 132px;
  }
}

/* 迷你購物車抽屜 */
.minicart {
  position: fixed;
  right: var(--sp-6);
  bottom: 84px;
  z-index: 97;
  width: min(360px, calc(100vw - var(--sp-8)));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-modal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--t-base) var(--ease),
    transform var(--t-base) var(--ease), visibility var(--t-base);
}

.minicart.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.minicart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-soft);
}

.minicart__list {
  max-height: 300px;
  overflow-y: auto;
  padding: var(--sp-2) var(--sp-5);
}

.minicart__item {
  display: flex;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
}

.minicart__item:last-child {
  border-bottom: 0;
}

.minicart__info {
  flex: 1;
  min-width: 0;
}

.minicart__name {
  font-size: var(--fs-body-system);
  line-height: var(--lh-snug);
  color: var(--fg-2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.minicart__meta {
  margin-top: 2px;
  font-family: var(--font-num);
  font-size: var(--fs-small);
  color: var(--muted);
}

.minicart__remove {
  flex: none;
  align-self: flex-start;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--r-btn);
  color: var(--muted);
}

.minicart__remove:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.minicart__remove svg {
  width: 13px;
  height: 13px;
}

.minicart__foot {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.minicart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.minicart__empty {
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-body-system);
}

@media (max-width: 549px) {
  .minicart {
    right: var(--sp-4);
    left: var(--sp-4);
    width: auto;
    bottom: 80px;
  }
}

/* ==========================================================================
   SHOPPING列表 / 內頁版面：側欄 + 工具列 + 網格
   ========================================================================== */

.shop {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}

.shop__aside {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
}

.shop__main {
  min-width: 0;
}

/* --- 側欄區塊 --- */
.filter-group + .filter-group {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-soft);
}

.filter-group__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-body-system);
  font-weight: 700;
}

.filter-group__title a {
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--muted);
}

.filter-group__title a:hover {
  color: var(--btn-blue);
}

.filter-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.filter-list__label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2);
  border-radius: var(--r-btn);
  font-size: var(--fs-body-system);
  color: var(--fg-2);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.filter-list__label:hover {
  background: var(--info-bg);
  color: var(--btn-blue);
}

.filter-list__label:has(input:checked) {
  background: var(--info-bg);
  color: var(--btn-blue);
  font-weight: 500;
}

.filter-list__count {
  margin-left: auto;
  font-size: var(--fs-small);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.filter-list__label:has(input:checked) .filter-list__count {
  color: inherit;
}

/* --- 工具列：數量 / 排序 --- */
.shop__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-soft);
}

.shop__count {
  font-size: var(--fs-body-system);
  color: var(--muted);
}

.shop__count strong {
  color: var(--btn-blue);
  font-variant-numeric: tabular-nums;
}

.shop__sort {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.shop__sort label {
  font-size: var(--fs-small);
  color: var(--muted);
  white-space: nowrap;
}

.shop__sort .select {
  width: auto;
  min-width: 150px;
}

/* --- 套用中的篩選 chip --- */
.shop__active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.shop__active-filters:empty {
  display: none;
}

/* --- 空結果 --- */
.shop__empty {
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}

.shop__empty-title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-subtitle);
  font-weight: 700;
}

.shop__empty-text {
  margin-bottom: var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-body-system);
}

/* --- 分頁 --- */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  justify-content: center;
  margin-top: var(--sp-8);
}

.pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--surface);
  font-size: var(--fs-body-system);
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.pager__btn:hover {
  border-color: var(--btn-blue);
  color: var(--btn-blue);
}

.pager__btn[aria-current="page"] {
  border-color: var(--btn-blue);
  background: var(--btn-blue);
  color: #fff;
}

.pager__btn[aria-disabled="true"] {
  color: var(--muted);
  pointer-events: none;
}

/* --- 側欄 CTA（進階 / 經銷商） --- */
.aside-cta {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--info-bg);
}

.aside-cta__title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-body-system);
  font-weight: 700;
}

.aside-cta__text {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ==========================================================================
   商品詳情
   ========================================================================== */

.pdp {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: var(--sp-8);
  align-items: start;
}

.pdp__gallery {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
}

.pdp__main-img .ph-img {
  border-radius: var(--r-card);
}

.pdp__thumbs {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.pdp__thumb {
  flex: 1;
  aspect-ratio: 1/1;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--info-bg);
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.pdp__thumb:hover,
.pdp__thumb[aria-current="true"] {
  border-color: var(--btn-blue);
  box-shadow: inset 0 0 0 1px var(--btn-blue);
}

.pdp__title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-page-title);
  line-height: 1.4;
}

.pdp__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  margin-bottom: var(--sp-5);
  font-size: var(--fs-small);
  color: var(--muted);
}

.pdp__price-box {
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--info-bg);
}

/* --------------------------------------------------------------------------
   商品頁規格選擇：先顏色 → 再容量
   .opt 是價格列裡的小字（例：「會員價」），所以這裡用 .pick 避免撞名。
   -------------------------------------------------------------------------- */
[data-pdp-options] {
  margin-bottom: var(--sp-5);
}

.pick + .pick {
  margin-top: var(--sp-4);
}

.pick__label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  color: var(--fg);
}

.pick__step {
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--promo-bg);
  color: var(--brand-ink);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: .02em;
}

.pick__todo {
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  color: var(--danger);
}

.pick__chip {
  gap: var(--sp-2);
  min-height: 40px;
  padding-right: var(--sp-4);
  text-align: left;
}

.pick__chip--dead,
.pick__chip[disabled] {
  border-style: dashed;
  background: var(--bg);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .65;
}

.pick__chip--dead:hover {
  border-color: var(--border);
  color: var(--muted);
}

/* 顏色色點：CMYK 是四個點，所以用彈性排而不是單一背景色 */
.pick__dots {
  display: inline-flex;
  gap: 2px;
}

.pick__dot {
  width: 11px;
  height: 11px;
  border: 1px solid rgb(0 0 0 / .3);
  border-radius: 50%;
}

.pick__val {
  white-space: nowrap;
}

.pick__hint {
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  color: var(--muted);
  white-space: nowrap;
}

.pick__hint--low {
  background: var(--warn-bg);
  color: var(--warn);
}


.pdp__price-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: baseline;
  margin-bottom: var(--sp-2);
}

.pdp__tier-table {
  width: 100%;
  margin-top: var(--sp-4);
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.pdp__tier-table th,
.pdp__tier-table td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.pdp__tier-table th {
  font-weight: 500;
  color: var(--muted);
}

.pdp__tier-table td {
  font-variant-numeric: tabular-nums;
}

.pdp__tier-table tr[data-current="true"] {
  background: var(--info-bg);
}

.pdp__tier-table tr[data-current="true"] td {
  font-weight: 700;
  color: var(--btn-blue);
}

.pdp__buy {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  margin-bottom: var(--sp-5);
}

.pdp__section + .pdp__section {
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-soft);
}

.pdp__section-title {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-subtitle);
  font-weight: 700;
}

/* 規格表 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body-system);
}

.spec-table th,
.spec-table td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 34%;
  font-weight: 500;
  color: var(--muted);
}

/* ==========================================================================
   機台型錄（僅展示、不標價）
   ========================================================================== */

.machine {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
  padding: var(--sp-8) 0;
  border-bottom: 2px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}

.machine:last-child {
  border-bottom: 0;
}

.machine__media {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
}

/* 正式機台照片：依容器比例、contain，上傳比例不一也不會破版 */
.machine__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-btn);
}

.machine__title {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-page-title);
}

.machine__desc {
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-btn) var(--r-btn) 0;
  background: var(--promo-bg);
  color: var(--fg);
  font-size: var(--fs-body-system);
}

.machine__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* 規格摘要 */
.machine__specs {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.machine__spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.machine__spec {
  flex: 1 1 auto;
  padding: var(--sp-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-btn);
  background: var(--info-bg);
}

.machine__spec dt {
  margin-bottom: 2px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.machine__spec dd {
  font-size: var(--fs-body-system);
  font-weight: 500;
}

/* 噴頭＝最重要的資訊：底色與其他相同，寬度依內容比例分配 */
.machine__spec--lead {
  flex: 1 1 auto;
}

/* 留資料下載 */
.gate {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}

.gate__title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-body-system);
  font-weight: 700;
}

.gate__text {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-small);
  color: var(--muted);
}

.gate__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-3);
  align-items: end;
}

.gate__form .field {
  margin: 0;
}

/* ==========================================================================
   購物車
   ========================================================================== */

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--sp-7);
  align-items: start;
}

.cart-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-soft);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line__thumb {
  width: 88px;
  aspect-ratio: 1/1;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-btn);
  overflow: hidden;
}

.cart-line__thumb .ph-img {
  border: 0;
  border-radius: 0;
}

.cart-line__name {
  margin-bottom: var(--sp-1);
  font-size: var(--fs-body-system);
  font-weight: 500;
}

.cart-line__name a:hover {
  color: var(--btn-blue);
}

.cart-line__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--muted);
}

.cart-line__controls {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  justify-content: flex-end;
}

.cart-line__price {
  min-width: 104px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cart-line__remove {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: var(--sp-1);
  border-radius: var(--r-btn);
  transition: color var(--t-fast);
}

.cart-line__remove:hover {
  color: var(--danger);
}

/* 每行的小計／級距提示 */
.cart-line__hint {
  margin-top: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--btn-blue);
}

.cart-summary {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.cart-summary > .panel {
  padding: var(--sp-5);
}

.cart-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  font-size: var(--fs-body-system);
}

.cart-summary__row--total {
  padding-top: var(--sp-3);
  margin-top: var(--sp-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-subtitle);
  font-weight: 700;
}

.cart-summary__row--total .t-price {
  font-size: var(--fs-page-title);
}

.cart-ship__methods {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.cart-ship__note {
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ==========================================================================
   響應式
   ========================================================================== */

@media (max-width: 1079px) {
  .shop {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: var(--sp-5);
  }

  .pdp {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: var(--sp-6);
  }

  .machine {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: var(--sp-5);
  }

  .cart-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--sp-5);
  }
}

@media (max-width: 849px) {
  .shop {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop__aside {
    position: static;
  }

  /* 側欄在平板以下收成可展開的篩選區 */
  .shop__aside[data-collapsed="true"] .filter-group,
  .shop__aside[data-collapsed="true"] .aside-cta {
    display: none;
  }

  .shop__aside[data-collapsed="false"] {
    padding: var(--sp-4);
    margin-bottom: var(--sp-5);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-card);
    background: var(--info-bg);
  }

  .pdp {
    grid-template-columns: minmax(0, 1fr);
  }

  .pdp__gallery,
  .machine__media {
    position: static;
  }

  .machine {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-4);
  }

  .machine__media {
    max-width: 480px;
    margin: 0 auto;
  }

  .machine__media .ph-img {
    max-height: 260px;
  }

  .cart-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 549px) {
  .shop__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .shop__sort {
    justify-content: space-between;
  }

  .shop__sort .select {
    flex: 1;
    min-width: 0;
  }

  .cart-line {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: var(--sp-3);
  }

  .cart-line__thumb {
    width: 64px;
  }

  .cart-line__controls {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .cart-line__price {
    min-width: 0;
  }

  .gate__form {
    grid-template-columns: minmax(0, 1fr);
  }

  .pager__btn {
    min-width: 34px;
    height: 34px;
  }
}

/* ==========================================================================
   檔案下載列（型錄 / 規格書 / 模板）
   ========================================================================== */

.file-list {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-row {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--bg);
}

.file-row--gated {
  border-style: dashed;
  border-color: var(--promo-line);
  background: var(--promo-bg);
}

.file-row__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--fg-2);
}

.file-row--gated .file-row__icon {
  background: var(--accent);
  color: var(--btn-ink);
}

.file-row__icon .btn__icon {
  width: 17px;
  height: 17px;
}

.file-row__body {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.file-row__name {
  font-size: var(--fs-body-system);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.file-row__meta {
  font-size: var(--fs-small);
  color: var(--muted);
}

.file-row .btn {
  flex: none;
}

/* ==========================================================================
   表單錯誤狀態
   ========================================================================== */

.form-error .input {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.field__error {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding: var(--sp-3);
  margin-top: var(--sp-3);
  border: 1px solid var(--danger-line);
  border-radius: var(--r-btn);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: var(--fs-small);
}

.field__error::before {
  content: "!";
  display: grid;
  flex: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 549px) {
  .file-row {
    flex-wrap: wrap;
  }

  .file-row .btn {
    width: 100%;
  }
}

.cart-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ==========================================================================
   商品詳情補充
   ========================================================================== */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.badge-row:empty {
  display: none;
}

.pdp__buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  margin: var(--sp-4) 0;
}

.pdp__buy-row .btn {
  flex: 1;
  min-width: 200px;
}

.pdp__msg {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  min-height: 28px;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-small);
}

.pdp__msg:empty {
  display: none;
}

.pdp__quote {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--surface);
}

.pdp__quote-lead {
  font-size: var(--fs-body-system);
  font-weight: var(--fw-bold);
  color: var(--fg);
}

@media (max-width: 549px) {
  .pdp__buy-row .btn {
    min-width: 0;
    width: 100%;
  }
}

/* ==========================================================================
   首頁・墨水方案（熱昇華 / DTF / UV）
   ========================================================================== */

.sol-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.sol-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow: 0 6px 20px rgba(12, 74, 96, 0.06);
}

.sol-card__head {
  display: grid;
  gap: var(--sp-2);
}

.sol-card__tag {
  justify-self: start;
  padding: 3px 10px;
  border-radius: var(--r-float);
  background: var(--info-bg);
  color: var(--btn-blue);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}

.sol-card__title {
  font-size: var(--fs-page-title);
  font-weight: var(--fw-bold);
  color: var(--fg);
}

.sol-card__lead {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: var(--lh-body);
}

.sol-card__block {
  display: grid;
  gap: var(--sp-2);
}

.sol-card__label {
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  color: var(--btn-blue);
}

.sol-card__label--pro {
  color: var(--success);
}

.sol-card__label--con {
  color: var(--warn);
}

.sol-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
  color: var(--fg-2);
  line-height: var(--lh-body);
}

.sol-list li {
  position: relative;
  padding-left: 14px;
}

.sol-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(12, 74, 96, 0.32);
}

.sol-card__proc {
  display: grid;
  gap: var(--sp-2);
  margin-top: auto;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-card);
  background: var(--info-bg);
}

.sol-steps {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: solstep;
  font-size: var(--fs-small);
  color: var(--fg-2);
  line-height: var(--lh-body);
}

.sol-steps li {
  position: relative;
  padding-left: 22px;
  counter-increment: solstep;
}

.sol-steps li::before {
  content: counter(solstep);
  position: absolute;
  top: 0.08em;
  left: 0;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: var(--fw-bold);
  line-height: 1;
}

@media (max-width: 900px) {
  .sol-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   首頁・傳檔前注意事項
   ========================================================================== */

.files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.files__item {
  display: grid;
  align-content: start;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(12, 74, 96, 0.05);
}

.files__head {
  justify-self: start;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 14px 4px 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, #63c9f5 0%, var(--brand) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(0, 90, 136, 0.25),
    0 3px 6px rgba(0, 111, 168, 0.28);
}

.files__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-float);
  background: #fff;
  color: var(--btn-blue);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  line-height: 1;
  box-shadow: inset 0 -2px 2px rgba(0, 90, 136, 0.15),
    0 1px 1px rgba(255, 255, 255, 0.5);
}

.files__title {
  font-size: var(--fs-body-system);
  font-weight: var(--fw-bold);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 90, 136, 0.35);
}

.files__text {
  font-size: var(--fs-body-system);
  color: var(--muted);
  line-height: var(--lh-body);
}

@media (max-width: 849px) {
  .files {
    grid-template-columns: 1fr;
  }
}

.cat-tile--machine {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: center;
  text-align: center;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  text-decoration: none;
  color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat-tile--machine:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  border-color: var(--brand);
}
.cat-tile--machine .cat-tile__thumb {
  width: 100%;
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
}
.cat-tile--machine .cat-tile__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .25s ease;
}
.cat-tile--machine:hover .cat-tile__thumb img {
  transform: scale(1.06);
}
.cat-tile--machine .cat-tile__name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.product-grid--static { gap: var(--sp-4); }
