/* ============================================================
   CH LADY — Components
   ============================================================ */

/* ============ Header ============ */
.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 249, 242, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
/* ★ 這一條一定要有：.hdr-shell 之前只在 @media(min-width:1000px) 裡定義，
   手機端就退回 <div> 的 display:block，結果漢堡、Logo、四個圖示各佔一行，
   頭部被撐成 110px（實測），黏性工具列的 top 也跟著錯位。 */
.hdr-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: var(--header-h);
  position: relative;
}

/* 手機：Logo 用絕對定位真正居中。
   flex 的 space-between 做不到——左邊漢堡 40px、右邊四顆圖示 175px，
   品牌區會被分到偏左的位置（實測中心點 128px，頁面中心是 195px）。 */
@media (max-width: 999px) {
  .hdr-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: 0 0 auto;
    pointer-events: auto;
  }
  /* 四顆圖示從 40px 收成 38px、間距歸零，右側才讓得出空間給居中的 Logo
     （原本 175px 寬，會壓到 Logo 右緣） */
  .hdr-actions { gap: 0; }
  .hdr-actions .icon-btn { width: 36px; height: 36px; }
  .hdr-actions .icon-btn svg { width: 20px; height: 20px; }
}
.hdr-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: var(--header-h);
}
.hdr-left { display: flex; align-items: center; gap: 8px; min-width: 40px; }
.hdr-brand {
  display: flex; align-items: center; gap: 9px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.hdr-brand img.hdr-mark {
  height: 30px; width: auto;
  border-radius: 2px;
}
.hdr-brand .brand-txt { display: none; }
.hdr-brand .brand-word {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: .13em;
  color: var(--espresso);
  white-space: nowrap;
}
.hdr-brand .brand-sub {
  font-size: 8.5px;
  letter-spacing: .22em;
  color: var(--champagne-dk);
  text-transform: uppercase;
  white-space: nowrap;
}
.hdr-actions { display: flex; align-items: center; gap: 5px; min-width: 40px; justify-content: flex-end; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--espresso);
  border-radius: 50%;
  transition: background .18s var(--ease);
}
.icon-btn:hover { background: var(--blush-soft); }
.icon-btn svg { width: 21px; height: 21px; }

/* 購物車數量：清楚可見 */
.cart-count {
  position: absolute;
  top: 4px; right: 3px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--espresso);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: grid; place-items: center;
  line-height: 1;
  border: 1.5px solid var(--cream);
}
.cart-count.is-empty { display: none; }

/* 桌面主導覽 */
.hdr-nav { display: none; }
@media (min-width: 1000px) {
  .hdr-main { height: 76px; }
  /* 桌面用 grid 三欄：品牌｜導覽｜圖示。
     這樣導覽才是「頁面正中」，而不是在剩餘空間裡居中（會被兩側不等寬推偏）。 */
  .hdr-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }
  .hdr-left { display: none; }   /* 桌面沒有漢堡選單，不必留 40px 空位 */
  .hdr-brand {
    grid-column: 1;
    justify-self: start;
    justify-content: flex-start;
    flex: 0 0 auto;
  }
  .hdr-brand img.hdr-mark { height: 44px; }
  .hdr-brand .brand-txt { display: block; }
  .hdr-brand .brand-word { font-size: 24px; letter-spacing: .18em; }
  .hdr-menu-btn { display: none; }
  .hdr-nav {
    grid-column: 2;
    display: flex;
    gap: 26px;
    align-items: center;
    margin: 0;
  }
  .hdr-actions { grid-column: 3; justify-self: end; }
  /* 導覽項改成「中文在上、越南文極小字在下」的兩行結構。
     原本中越並排同一行，7 個項目在 1440px 就被右側圖示壓到，
     而且兩種語言同字級互相搶焦點 —— 精品站的導覽必須乾淨。 */
  .hdr-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 13px;
    letter-spacing: .12em;
    line-height: 1.2;
    color: var(--espresso);
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
  }
  .hdr-nav .nav-vi {
    display: block;
    margin: 0;
    font-size: 9px;
    letter-spacing: .03em;
    line-height: 1.15;
    color: var(--text-mute);
    font-style: italic;
    opacity: .92;
  }
  .hdr-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 1px;
    background: var(--champagne);
    transform: scaleX(0);
    transition: transform .25s var(--ease);
  }
  .hdr-nav a:hover::after,
  .hdr-nav a.is-active::after { transform: scaleX(1); }
  .hdr-nav a.is-active { color: var(--champagne-dk); }
}

/* 公告條 */
.announce {
  background: var(--blush);
  color: var(--espresso);
  text-align: center;
  font-size: 12.5px;
  padding: 7px var(--gutter);
  letter-spacing: .04em;
}
.announce .vi { display: block; font-size: 11px; opacity: .78; font-style: italic; }

/* 搜尋列 */
.search-bar {
  display: none;
  border-top: 1px solid var(--line-soft);
  padding: 11px 0;
}
.search-bar.is-open { display: block; }
.search-bar .wrap { display: flex; gap: 9px; align-items: center; }

/* ============ Footer ============ */
.ftr {
  background: var(--espresso);
  color: #E8DDD2;
  padding: 40px 0 0;
  margin-top: 8px;
}
.ftr a { color: #E8DDD2; }
.ftr a:hover { color: var(--champagne-lt); }
.ftr-top { display: grid; grid-template-columns: 1fr; gap: 28px; padding-bottom: 30px; }
.ftr-brand img {
  height: 84px; width: auto;
  background: var(--cream);
  padding: 9px;
  border-radius: var(--radius);
  margin-bottom: 13px;
}
.ftr-brand .tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--champagne-lt);
  margin-bottom: 4px;
}
.ftr-brand p { font-size: 13px; color: #B8A99C; line-height: 1.7; }
.ftr h4 {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--champagne-lt);
  margin-bottom: 13px;
  font-weight: 500;
}
.ftr-links li { margin-bottom: 9px; font-size: 13.5px; }
.ftr-social { display: flex; gap: 10px; margin-top: 4px; }
.ftr-social a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.ftr-social a:hover { background: rgba(255,255,255,.09); border-color: var(--champagne-lt); }
.ftr-social svg { width: 18px; height: 18px; }
.ftr-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: #9D8E82;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: center;
}
@media (min-width: 700px) {
  .ftr-top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
  .ftr { padding-top: 56px; }
  .ftr-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ============ Product card ============ */
.pcard {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.pcard:hover { box-shadow: var(--shadow-md); border-color: var(--line-gold); }
/* ★ 必須 display:block —— 這是 <a>，預設是 inline。
   inline 元素忽略 aspect-ratio，圖片會用原始比例把卡片撐爆，
   下面 .pcard-body（名稱/價格/色點）就被推到卡外、被 overflow:hidden 裁掉。 */
.pcard-media {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--blush-soft);
  overflow: hidden;
}
.pcard-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.pcard:hover .pcard-media img { transform: scale(1.035); }
.pcard-tags {
  position: absolute;
  top: 9px; left: 9px;
  display: flex; flex-direction: column; gap: 5px;
  align-items: flex-start;
}
.pcard-fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: grid; place-items: center;
  color: var(--text-soft);
  z-index: 2;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.pcard-fav:hover { background: #fff; color: var(--champagne-dk); }
.pcard-fav.is-on { color: #B5453A; }
.pcard-fav svg { width: 17px; height: 17px; }
.pcard-body { padding: 11px 12px 13px; }
.pcard-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .035em;
  color: var(--espresso);
  line-height: 1.5;
  margin-bottom: 3px;
}
.pcard-name-vi {
  font-size: 11.5px;
  color: var(--text-mute);
  font-style: italic;
  margin-bottom: 7px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-price-row { display: flex; align-items: baseline; flex-wrap: wrap; }
.pcard-colors {
  display: flex; gap: 5px; margin-top: 9px; align-items: center;
  flex-wrap: wrap;
}
.cdot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(56,41,32,.16);
  flex-shrink: 0;
}
.cdot-more { font-size: 11px; color: var(--text-mute); }
.pcard-soldout {
  position: absolute; inset: 0;
  background: rgba(255, 249, 242, .74);
  display: grid; place-items: center;
  backdrop-filter: blur(1px);
}
.pcard-soldout span {
  background: var(--espresso);
  color: #fff;
  font-size: 12px;
  letter-spacing: .14em;
  padding: 7px 15px;
  border-radius: var(--radius);
}

/* 快速選規格（列表頁） */
.pcard-quick {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line-soft);
  padding: 9px 11px;
  transform: translateY(101%);
  transition: transform .28s var(--ease);
  display: flex; gap: 7px;
}
.pcard:hover .pcard-quick { transform: none; }
@media (hover: none) {
  .pcard-quick { display: none; }
  .pcard-quick-btn { display: flex; }
}
.pcard-quick-btn { display: none; }

/* ============ Category tile ============ */
.cat-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--blush-soft);
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile-body {
  position: absolute; inset: auto 0 0 0;
  padding: 18px 14px 15px;
  background: linear-gradient(to top, rgba(42,31,24,.72), rgba(42,31,24,.06) 72%, transparent);
  color: #fff;
}
.cat-tile-body .zh {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: .06em;
}
.cat-tile-body .vi { font-size: 11.5px; opacity: .85; font-style: italic; }

/* ============ Hero ============ */
.hero {
  position: relative;
  background: var(--blush-soft);
  overflow: hidden;
}
.hero-media {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 74vh;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.hero-overlay {
  position: absolute; inset: 0;
  /* 原本 .62/.22/.04 的漸層在紗簾這種高亮背景上不夠，白字只有約 2:1 對比。
     拉深到 .70/.36/.08：白字落到 4.5:1 以上（AA），同時保留紗的通透感。 */
  background: linear-gradient(to top,
    rgba(42,31,24,.70) 0%,
    rgba(42,31,24,.36) 42%,
    rgba(42,31,24,.08) 68%,
    rgba(42,31,24,0) 88%);
}
.hero-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 var(--gutter) 30px;
  color: #fff;
  max-width: var(--page-max);
  margin: 0 auto;
}
.hero-body .eyebrow {
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #FBF0E7;
  margin-bottom: 9px;
  /* 這個小字壓在亮紗簾上幾乎消失，給一層柔光陰影把它托住 */
  text-shadow: 0 1px 8px rgba(42,31,24,.55), 0 0 2px rgba(42,31,24,.35);
}
.hero-body h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 7.8vw, 54px);
  font-weight: 300;
  line-height: 1.36;
  letter-spacing: .045em;
  color: #fff;
  margin-bottom: 10px;
  /* 對比度：細字重白字壓在淺粉紗簾上會糊掉，用雙層陰影把字「托」起來 */
  text-shadow: 0 1px 2px rgba(42,31,24,.22), 0 2px 22px rgba(42,31,24,.4);
  /* 用 pretty 而不是 balance：balance 會把兩行拉成等寬，
     中文就會從詞中間斷開（實測「特別」被拆成「為特／別的」）。
     pretty 只優化最後一行，不動中間斷點。 */
  text-wrap: pretty;
}
.hero-body .vi {
  font-size: 14px;
  font-style: italic;
  color: #F3E4DA;
  margin-bottom: 18px;
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(42,31,24,.35);
}
.hero-body .btn-primary {
  background: var(--cream);
  color: var(--espresso);
  border-color: var(--cream);
  font-weight: 600;
}
.hero-body .btn-primary:hover { background: #fff; border-color: #fff; }
@media (min-width: 900px) {
  .hero-media { aspect-ratio: 21 / 9; max-height: 80vh; }
  .hero-body { padding: 0 0 56px; }
  .hero-overlay {
    /* 桌機用「左下角局部暈影」而不是整條漸層：
       全寬漸層會把整張照片壓灰、紗簾的通透感就沒了。
       只在文字所在的下左角加深，右上留白保持乾淨。 */
    background:
      radial-gradient(115% 88% at 6% 94%,
        rgba(42,31,24,.66) 0%, rgba(42,31,24,.36) 38%,
        rgba(42,31,24,.08) 66%, rgba(42,31,24,0) 82%),
      linear-gradient(to top, rgba(42,31,24,.16) 0%, rgba(42,31,24,0) 32%);
  }
  .hero-body h1 { max-width: 820px; }
  .hero-body .vi { max-width: 560px; }
}

/* ============ Video reel card ============ */
.reel-card {
  position: relative;
  display: block;
  width: 208px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--espresso);
}
@media (min-width: 700px) { .reel-card { width: 232px; } }
.reel-card img { width: 100%; height: 100%; object-fit: cover; opacity: .96; }
.reel-card .reel-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(42,31,24,.82) 0%, transparent 46%);
}
.reel-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255, 249, 242, .9);
  display: grid; place-items: center;
  color: var(--espresso);
  transition: transform .22s var(--ease);
}
.reel-card:hover .reel-play { transform: translate(-50%, -50%) scale(1.09); }
.reel-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 13px;
  color: #fff;
}
.reel-meta .zh { font-size: 13.5px; font-weight: 500; line-height: 1.45; margin-bottom: 3px; }
.reel-meta .vi { font-size: 11px; opacity: .82; font-style: italic; }
.reel-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,249,242,.92);
  color: var(--espresso);
  font-size: 10.5px;
  letter-spacing: .1em;
  padding: 4px 9px;
  border-radius: var(--radius);
}

/* 影音 modal 內的關聯商品 */
.reel-products { display: flex; flex-direction: column; gap: 9px; }
.reel-prod-row {
  display: flex; gap: 10px; align-items: center;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.reel-prod-row img { width: 46px; height: 62px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }

/* ============ Product detail ============ */
.pd-gallery { background: var(--blush-soft); }
.pd-main-img {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--blush-soft);
}
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; padding: 10px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumb {
  width: 62px; height: 82px;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  border: 1.5px solid transparent;
  opacity: .68;
  transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.is-active { border-color: var(--champagne); opacity: 1; }

.pd-info { padding: 20px var(--gutter); }
.pd-cat {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--champagne-dk);
  margin-bottom: 7px;
}
.pd-title { margin-bottom: 4px; }
.pd-title-vi {
  font-size: 14px;
  color: var(--text-soft);
  font-style: italic;
  margin-bottom: 13px;
  line-height: 1.5;
}
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; margin-bottom: 16px; }

/* 規格選擇 */
.opt-group { margin-bottom: 18px; }
.opt-label {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 9px;
}
.opt-label .lb { font-size: 13px; font-weight: 500; color: var(--text-soft); }
.opt-label .picked { font-size: 12.5px; color: var(--espresso); }
.opt-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn {
  min-width: 46px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--espresso);
  transition: all .2s var(--ease);
}
.size-btn:hover:not(.is-disabled) { border-color: var(--champagne); }
.size-btn.is-active {
  background: var(--espresso);
  border-color: var(--espresso);
  color: #fff;
}
.size-btn.is-disabled {
  color: #C4B7AC;
  background: var(--cream-deep);
  border-color: var(--line-soft);
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
}
.size-btn.is-disabled::after {
  content: "";
  position: absolute;
  left: -10%; right: -10%; top: 50%;
  height: 1px;
  background: #D8C9BC;
  transform: rotate(-18deg);
}
.color-btns { display: flex; gap: 9px; flex-wrap: wrap; }
.color-btn {
  display: flex; align-items: center; gap: 7px;
  min-height: 40px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  transition: all .2s var(--ease);
}
.color-btn:hover { border-color: var(--champagne); }
.color-btn.is-active { border-color: var(--espresso); box-shadow: inset 0 0 0 1px var(--espresso); }
.color-btn.is-disabled { opacity: .42; cursor: not-allowed; }
.color-btn .sw {
  width: 17px; height: 17px; border-radius: 50%;
  border: 1px solid rgba(56,41,32,.2);
  flex-shrink: 0;
}

/* 數量 */
.qty-ctl {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.qty-ctl button {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--espresso);
  font-size: 17px;
  transition: background .18s var(--ease);
}
.qty-ctl button:hover:not([disabled]) { background: var(--blush-soft); }
.qty-ctl button[disabled] { color: #C4B7AC; cursor: not-allowed; }
.qty-ctl .qn {
  min-width: 44px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 500;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  height: 42px;
  line-height: 42px;
}
.qty-ctl.sm button { width: 34px; height: 34px; font-size: 15px; }
.qty-ctl.sm .qn { min-width: 36px; height: 34px; line-height: 34px; font-size: 13.5px; }

/* 庫存提示 */
.stock-note { font-size: 12.5px; margin-top: 9px; display: flex; align-items: center; gap: 6px; }
.stock-ok { color: var(--success); }
.stock-low { color: var(--warn); }
.stock-out { color: var(--danger); }

/* 規格表 */
.size-table { font-size: 13.5px; }
.size-table th, .size-table td {
  border: 1px solid var(--line-soft);
  padding: 9px 11px;
  text-align: center;
}
.size-table th {
  background: var(--cream-deep);
  font-weight: 500;
  color: var(--espresso);
  font-size: 12.5px;
}
.size-table td { color: var(--text-soft); }

/* ============ Cart ============ */
.cart-row {
  display: flex; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.cart-row img {
  width: 76px; height: 100px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--blush-soft);
}
.cart-row .cr-body { flex: 1; min-width: 0; }
.cart-row .cr-name { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.cart-row .cr-spec { font-size: 12.5px; color: var(--text-mute); margin-bottom: 8px; }

.summary-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px;
  padding: 6px 0;
}
.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 13px;
  font-size: 16px;
  font-weight: 600;
}
.summary-row .lbl { color: var(--text-soft); }
.summary-row.discount .val { color: #A8392F; }

/* 優惠碼 */
.coupon-row { display: flex; gap: 8px; }
.coupon-row .input { flex: 1; }

/* ============ Checkout steps ============ */
.steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 16px 0 20px;
  font-size: 12px;
}
.steps .st { display: flex; align-items: center; gap: 6px; color: var(--text-mute); }
.steps .st .dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 11px;
  background: #fff;
  flex-shrink: 0;
}
.steps .st.is-done .dot { background: var(--espresso); border-color: var(--espresso); color: #fff; }
.steps .st.is-active { color: var(--espresso); font-weight: 500; }
.steps .st.is-active .dot { border-color: var(--champagne-dk); color: var(--champagne-dk); font-weight: 600; }
.steps .bar { width: 16px; height: 1px; background: var(--line); margin: 0 6px; }
@media (min-width: 640px) { .steps .bar { width: 40px; } }

/* 選項卡（配送/付款） */
.pick-card {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.pick-card:hover { border-color: var(--champagne-lt); }
.pick-card.is-active { border-color: var(--espresso); background: #FFFCF7; box-shadow: inset 0 0 0 1px var(--espresso); }
.pick-card.is-disabled { opacity: .5; cursor: not-allowed; background: var(--cream-deep); }
.pick-card input { margin-top: 3px; accent-color: var(--champagne-dk); width: 17px; height: 17px; flex-shrink: 0; }
.pick-card .pc-title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.pick-card .pc-desc { font-size: 12.5px; color: var(--text-mute); line-height: 1.6; }
.pick-card .pc-fee { font-size: 13px; font-weight: 500; color: var(--espresso); white-space: nowrap; }

/* 訂單結果 */
.result-icon {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
}
.result-ok { background: var(--success-bg); color: var(--success); }
.result-pending { background: var(--warn-bg); color: var(--warn); }
.result-fail { background: var(--danger-bg); color: var(--danger); }

/* ============ Member / account ============ */
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 26px 20px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  gap: 4px;
}
.tabs button {
  flex: 1;
  padding: 11px 8px;
  font-size: 14px;
  color: var(--text-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.tabs button.is-active {
  color: var(--espresso);
  border-bottom-color: var(--champagne);
  font-weight: 500;
}

.acct-nav { display: flex; flex-direction: column; }
.acct-nav a {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.acct-nav a:hover { background: var(--cream-deep); }
.acct-nav a.is-active { color: var(--champagne-dk); font-weight: 500; background: var(--blush-soft); }

/* 訂單卡 */
.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  margin-bottom: 12px;
}
.order-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: var(--cream-deep);
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.order-card-head .no { font-size: 13px; font-weight: 500; letter-spacing: .03em; }
.order-card-body { padding: 13px 14px; }
.order-prod-row { display: flex; gap: 10px; padding: 7px 0; align-items: center; }
.order-prod-row img { width: 42px; height: 56px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }

/* 訂單進度 */
.track { display: flex; flex-direction: column; gap: 0; }
.track-item { display: flex; gap: 12px; }
.track-item .ti-rail {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
}
.track-item .ti-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--line);
  margin-top: 6px;
  flex-shrink: 0;
}
.track-item.is-done .ti-dot { background: var(--champagne); }
.track-item .ti-line { width: 1px; flex: 1; background: var(--line); min-height: 22px; }
.track-item:last-child .ti-line { display: none; }
.track-item .ti-body { padding-bottom: 16px; }
.track-item .ti-title { font-size: 13.5px; font-weight: 500; }
.track-item.is-pending .ti-title { color: var(--text-mute); font-weight: 400; }
.track-item .ti-time { font-size: 12px; color: var(--text-mute); }

/* ============ Admin ============ */
.admin-shell { display: flex; min-height: 100vh; background: var(--cream-deep); }
.admin-side {
  display: none;
  width: 236px;
  flex-shrink: 0;
  background: var(--espresso);
  color: #E8DDD2;
  padding: 18px 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.admin-side .as-brand {
  padding: 0 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 12px;
}
.admin-side .as-brand .nm {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: .1em;
  color: var(--champagne-lt);
}
.admin-side .as-brand .sub { font-size: 11px; color: #9D8E82; }
.admin-side nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  font-size: 13.5px;
  color: #CBBBAE;
  border-left: 2px solid transparent;
  transition: all .18s var(--ease);
}
.admin-side nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-side nav a.is-active {
  background: rgba(255,255,255,.07);
  color: #fff;
  border-left-color: var(--champagne);
}
.admin-side nav .grp {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8A7A6D;
  padding: 16px 18px 6px;
}
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  position: sticky; top: 0; z-index: 60;
}
.admin-bar .ab-title { font-size: 16px; font-weight: 500; }
.admin-body { padding: 18px var(--gutter) 40px; flex: 1; }
@media (min-width: 1000px) {
  .admin-side { display: block; }
  .admin-body { padding: 24px 28px 48px; }
  .admin-bar { padding: 14px 28px; }
}

/* 後台手機版導覽 */
.admin-mobnav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px var(--gutter);
  background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  position: sticky; top: 0; z-index: 59;
}
.admin-mobnav::-webkit-scrollbar { display: none; }
.admin-mobnav a {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.admin-mobnav a.is-active { background: var(--espresso); border-color: var(--espresso); color: #fff; }
@media (min-width: 1000px) { .admin-mobnav { display: none; } }

/* 後台統計卡 */
.stat-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 15px;
}
.stat-card .sc-lbl { font-size: 12px; color: var(--text-mute); margin-bottom: 6px; letter-spacing: .03em; }
.stat-card .sc-val {
  font-family: var(--font-serif);
  font-size: 25px;
  color: var(--espresso);
  line-height: 1.2;
}
.stat-card .sc-sub { font-size: 11.5px; color: var(--text-mute); margin-top: 4px; }

/* 後台表格 */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { min-width: 620px; font-size: 13.5px; }
.tbl th, .tbl td {
  padding: 10px 11px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tbl th {
  background: var(--cream-deep);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--espresso);
  white-space: nowrap;
  position: sticky; top: 0;
}
.tbl tbody tr:hover { background: #FFFCF8; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl img.thumb { width: 38px; height: 50px; object-fit: cover; border-radius: 2px; }

/* 變體庫存編輯格 */
.variant-grid { display: grid; gap: 8px; }
.variant-cell {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 7px 9px;
  background: #fff;
}
.variant-cell .vc-color { font-size: 12.5px; min-width: 62px; display: flex; align-items: center; gap: 5px; }
.variant-cell .vc-size { font-size: 12.5px; color: var(--text-soft); min-width: 30px; }
.variant-cell .input { min-height: 34px; padding: 5px 8px; font-size: 14px; width: 76px; }

/* 圖片排序列 */
.media-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
}
.media-row img { width: 46px; height: 62px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.media-row .mr-url {
  flex: 1; min-width: 0;
  font-size: 11.5px;
  color: var(--text-mute);
  word-break: break-all;
  line-height: 1.5;
}
.media-row .mr-ord { display: flex; flex-direction: column; gap: 3px; }

/* 標籤切換 */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13px;
  background: #fff;
  color: var(--text-soft);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--champagne); }
.chip.is-active { background: var(--espresso); border-color: var(--espresso); color: #fff; }

/* 篩選抽屜內 */
.filter-sec { margin-bottom: 22px; }
.filter-sec h4 {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 11px;
  color: var(--espresso);
  letter-spacing: .04em;
}
.price-inputs { display: flex; align-items: center; gap: 8px; }
.price-inputs .input { min-height: 42px; font-size: 15px; }

/* 分類頁工具列 */
.listbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.listbar .cnt { font-size: 13px; color: var(--text-mute); }

/* ★ 工具列不要讓 flex 亂壓：下拉選單的 max-content 很寬，
   會把「篩選」按鈕擠成一個字寬（中文就變直排）。
   固定前兩者不縮，讓 select 自己收。 */
.listbar .cnt { flex: 0 0 auto; white-space: nowrap; }
.listbar > .row { flex: 0 1 auto; min-width: 0; }
.listbar > .row > .btn,
.listbar #btn-filter { flex: 0 0 auto; white-space: nowrap; }
.listbar > .row > .select { flex: 0 0 auto; min-width: 0; }

/* 篩選鈕裡的雙語要「上下兩行」而不是被擠到斷行：
   篩選 / Lọc 各自一行，跟導覽列一致（只作用在工具列，避免影響全站 CTA 高度）。
   高度對齊右邊的排序下拉（38px），兩顆控制項才不會一高一低。 */
.listbar .btn-sm { min-height: 38px; padding: 4px 13px; }
.listbar .btn-sm > span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.listbar .btn-sm .t-vi { display: block; font-size: 9px; line-height: 1.15; margin-top: 1px; opacity: .72; }

/* 篩選標籤列 */
.active-filters { display: flex; gap: 7px; flex-wrap: wrap; padding: 12px 0 0; }
.af-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--blush-soft);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--espresso);
}
.af-tag button { color: var(--text-mute); font-size: 15px; line-height: 1; }
.af-tag button:hover { color: var(--danger); }

/* 圖片放大（lightbox） */
.lightbox {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(30, 22, 17, .94);
  display: grid; place-items: center;
  padding: 0;
  animation: fadeIn .2s var(--ease);
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 14px; right: 14px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  display: grid; place-items: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.24); }

/* 影音播放器 */
.video-shell {
  position: relative;
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 74vh;
  width: 100%;
  overflow: hidden;
}
.video-shell video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--espresso);
  color: #E8DDD2;
  text-align: center;
  padding: 24px;
}

/* ============ 語言切換 ============ */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.lang-btn {
  padding: 7px 11px;
  font-size: 12.5px;
  color: var(--text-mute);
  border-right: 1px solid var(--line-soft);
  transition: background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.lang-btn:last-child { border-right: 0; }
.lang-btn:hover { background: var(--blush-soft); color: var(--espresso); }
.lang-btn.is-active { background: var(--espresso); color: #fff; font-weight: 500; }

/* 頁首語言切換（桌面才顯示） */
.hdr-lang { display: none; }
@media (min-width: 1000px) {
  .hdr-lang { display: block; }
  .hdr-lang .lang-switch { border-color: var(--line-gold); }
  .hdr-lang .lang-btn { padding: 5px 9px; font-size: 11.5px; }
}

/* 手機語言切換（頁首右側） */
.lang-mobile-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--espresso);
  border-radius: 50%;
}
.lang-mobile-btn:hover { background: var(--blush-soft); }

/* ============ 錯誤／載入狀態頁 ============ */
.state-page {
  max-width: 460px;
  margin: 0 auto;
  padding: 56px 20px;
  text-align: center;
}
.state-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blush-soft);
  color: var(--champagne-dk);
}
.state-icon svg { width: 28px; height: 28px; }
.state-page h2 { margin-bottom: 8px; }
.state-page p { color: var(--text-soft); font-size: 14px; margin-bottom: 20px; }

/* 雙語對照排列 */
.bi-pair { display: block; }
.bi-pair .t-vi { margin-top: 1px; }

/* 商品列表工具列黏頂 */
.listbar-sticky {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(255,249,242,.97);
  backdrop-filter: blur(8px);
}
@media (min-width: 1000px) { .listbar-sticky { top: 76px; } }

/* 空狀態圖示 */
.empty-icon svg { width: 100%; height: 100%; }

/* ============================================================
   追加：結帳 / 會員 / 後台 / 實用工具
   ============================================================ */

/* 版面骨架 */
.main { min-height: 60vh; }
.main.is-admin { min-height: 100vh; background: var(--cream-deep); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--espresso); color: var(--cream); padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* 實用工具 */
.grow { flex: 1 1 auto; min-width: 0; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap-flex { flex-wrap: wrap; }
.mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.ml-8 { margin-left: 8px; }
.py-24 { padding-top: 24px; padding-bottom: 24px; }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; } .fs-15 { font-size: 15px; }
.t-ok { color: var(--success); }
.t-warn { color: var(--warn); }
.t-danger { color: var(--danger); }
.strike { text-decoration: line-through; }
.clamp-1, .clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }
.badge-ok { background: var(--success-bg); color: var(--success); }
.btn-link {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; color: var(--text-soft);
  font-size: 13px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; padding: 4px 2px;
}
.btn-link:hover { color: var(--espresso); }
.btn-link.danger { color: var(--danger); }
.btn-link svg { width: 15px; height: 15px; }
.link-u { color: var(--espresso); text-decoration: underline; text-underline-offset: 3px; }
.hint { font-size: 11.5px; color: var(--text-mute); margin-top: 5px; line-height: 1.6; }
.lbl { display: block; font-size: 12.5px; color: var(--text-soft); margin-bottom: 6px; font-weight: 500; }
.divider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0;
  color: var(--text-mute); font-size: 12px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* 分頁籤 */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: 9px 14px; font-size: 13.5px; color: var(--text-mute);
  border-bottom: 2px solid transparent; white-space: nowrap;
  font-family: inherit; text-decoration: none;
}
.tab.is-active { color: var(--espresso); border-bottom-color: var(--champagne); font-weight: 500; }

/* 長文 */
.prose p { margin-bottom: 14px; line-height: 1.95; font-size: 14.5px; color: var(--text-soft); }
.prose .vi { color: var(--text-mute); font-style: italic; font-size: 13.5px; }

/* 購物車 */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.cart-summary { position: static; }
@media (min-width: 1000px) {
  .cart-layout { grid-template-columns: 1fr 340px; gap: 28px; }
  .cart-summary { position: sticky; top: 92px; }
}
.cart-row {
  display: grid; grid-template-columns: 78px 1fr auto; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cart-row:last-child { border-bottom: 0; }
.cart-thumb { display: block; width: 78px; height: 100px; background: var(--blush); border-radius: 2px; overflow: hidden; }
.cart-name { font-size: 14px; color: var(--espresso); text-decoration: none; display: block; }
.cart-spec { font-size: 12.5px; color: var(--text-mute); margin-top: 3px; }
.cart-spec .dot { margin: 0 5px; }
.cart-price { font-size: 14px; color: var(--espresso); margin-top: 4px; }
.cart-line-total { font-size: 14px; font-weight: 500; text-align: right; min-width: 74px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row .input { flex: 1; }
.coupon-row .btn { flex-shrink: 0; }
.summary-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; font-size: 13.5px; color: var(--text-soft);
}
.summary-row.sum-total {
  border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px;
  font-size: 16px; color: var(--espresso); font-weight: 600;
}

/* 結帳 */
.co-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 1000px) { .co-layout { grid-template-columns: 1fr 340px; gap: 28px; } }
.steps {
  display: flex; gap: 8px; list-style: none; margin: 0 0 22px;
  padding: 0; flex-wrap: wrap;
}
.steps li {
  display: flex; align-items: center; gap: 7px; font-size: 13px;
  color: var(--text-mute); padding: 6px 0;
}
.steps li .num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blush); color: var(--text-soft); font-size: 11.5px;
}
.steps li.is-active { color: var(--espresso); font-weight: 500; }
.steps li.is-active .num { background: var(--espresso); color: var(--cream); }
.steps li.is-done .num { background: var(--champagne); color: #FFFBF3; }

.pick-list { display: grid; gap: 10px; }
.pick-card {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; background: #fff; transition: border-color .15s, background .15s;
}
.pick-card input { position: absolute; opacity: 0; pointer-events: none; }
.pick-card.is-active { border-color: var(--espresso); background: var(--blush-soft); }
.pick-card.is-disabled { opacity: .45; cursor: not-allowed; }
.pick-card .pk-title { display: block; font-size: 14px; color: var(--espresso); }
.pick-card .pk-sub { display: block; font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.pick-card .pk-check { color: var(--espresso); display: grid; place-items: center; }
.pick-card .pk-check svg { width: 18px; height: 18px; }

.kv-block { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kv {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--text-mute); flex-shrink: 0; }
.kv > strong { text-align: right; font-weight: 500; color: var(--espresso); }

/* 門市選擇 */
.store-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 12px 4px; cursor: pointer; font-family: inherit; text-align: left;
}
.store-item:hover { background: var(--cream-deep); }
.store-item .st-name { display: block; font-size: 13.5px; color: var(--espresso); }
.store-item .st-addr { display: block; font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.store-item .st-id { font-size: 11.5px; color: var(--text-mute); }

/* 會員中心 */
.acct-layout { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 860px) { .acct-layout { grid-template-columns: 200px 1fr; gap: 26px; } }
.acct-nav { display: flex; gap: 6px; overflow-x: auto; }
.acct-nav a {
  padding: 9px 14px; font-size: 13.5px; color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 100px; white-space: nowrap;
}
.acct-nav a.is-active { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
@media (min-width: 860px) {
  .acct-nav { flex-direction: column; overflow: visible; }
  .acct-nav a { border: 0; border-radius: 0; border-left: 2px solid transparent; padding: 10px 12px; }
  .acct-nav a.is-active { background: transparent; color: var(--espresso); border-left-color: var(--champagne); font-weight: 500; }
}
.acct-body { min-width: 0; }

.order-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: #fff; }
.oc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.oc-no { font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.oc-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.oc-body { padding: 12px 0; }
.oc-foot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; }
.oc-total { font-size: 16px; font-weight: 600; }

.track { list-style: none; margin: 0; padding: 0 0 0 18px; }
.track li { position: relative; padding: 0 0 16px; border-left: 1px solid var(--line); padding-left: 16px; }
.track li:last-child { border-left-color: transparent; }
.track .tk-dot {
  position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--champagne);
}

/* 影音 */
.reel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* 影音頁面是網格：卡片改為撐滿欄寬（首頁橫捲條才用固定 208px） */
.reel-grid > * { min-width: 0; }
.reel-grid .reel-card { width: 100%; }
.reel-card .zh, .reel-card .vi { overflow-wrap: anywhere; }
@media (min-width: 700px) { .reel-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .reel-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.reel-prods { display: grid; gap: 8px; }
.rp-item {
  display: flex; align-items: center; gap: 12px; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit;
}
.rp-item:hover { background: var(--cream-deep); }
.rp-thumb { width: 46px; height: 60px; background: var(--blush); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.rp-item svg { width: 16px; height: 16px; color: var(--text-mute); }

/* 後台 */
.admin-shell { display: flex; min-height: 100vh; background: var(--cream-deep); }
.admin-side {
  width: 236px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line);
  display: none; flex-direction: column; padding: 16px 0;
}
@media (min-width: 1000px) { .admin-side { display: flex; } }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 16px 16px; border-bottom: 1px solid var(--line); }
.admin-brand img { width: 34px; height: 34px; border-radius: 2px; object-fit: cover; }
.admin-brand strong { font-size: 14px; letter-spacing: .06em; }
.admin-nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  font-size: 13.5px; color: var(--text-soft); text-decoration: none;
}
.admin-nav a:hover { background: var(--cream-deep); }
.admin-nav a.is-active { color: var(--espresso); background: var(--blush-soft); font-weight: 500; }
.admin-nav .ic { display: grid; place-items: center; width: 18px; }
.admin-nav .ic svg { width: 17px; height: 17px; }
.admin-side-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.admin-menu-btn { display: grid; }
@media (min-width: 1000px) { .admin-menu-btn { display: none; } }
.admin-mobnav { display: none; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); }
.admin-mobnav.is-open { display: flex; }
.admin-mobnav a { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 13.5px; color: var(--text-soft); }
.admin-mobnav a.is-active { background: var(--blush-soft); color: var(--espresso); }
.admin-body { padding: 16px; flex: 1; }
@media (min-width: 700px) { .admin-body { padding: 22px 26px; } }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--text-mute);
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--cream-deep); }
.tbl .input, .tbl .select { min-height: 34px; font-size: 13px; }

.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-card.ok { border-left: 3px solid var(--success); }
.stat-card.warn { border-left: 3px solid var(--warn); }
.stat-card.danger { border-left: 3px solid var(--danger); }
.st-label { font-size: 11.5px; color: var(--text-mute); letter-spacing: .04em; }
.st-value { font-size: 20px; font-weight: 600; margin-top: 4px; color: var(--espresso); }
.st-sub { font-size: 11.5px; color: var(--text-mute); margin-top: 3px; }

.media-list { display: grid; gap: 8px; }
.media-row { display: flex; align-items: center; gap: 10px; }
.mr-handle { color: var(--text-mute); cursor: default; }
.mr-thumb { width: 48px; height: 62px; background: var(--blush); border-radius: 2px; overflow: hidden; flex-shrink: 0; }

/* 等寬字：只給網址、單號這類需要對齊的字串用 */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace; }

/* ============================================================
   後台「可上傳的圖片欄位」（Logo / Banner / 品牌故事圖）
   預覽框固定尺寸，圖片用 object-fit: contain 完整呈現，
   避免長條 Logo 被裁掉、也避免整塊被拉變形。
   ============================================================ */
.img-field-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.img-field-main { flex: 1 1 240px; min-width: 0; }
.img-prev {
  display: grid; place-items: center;
  background: var(--blush-soft, #F7EBE3);
  border: 1px solid var(--line-soft, #E8DDD2);
  border-radius: var(--radius, 4px);
  overflow: hidden;
  flex-shrink: 0;
  padding: 8px;
}
.img-prev img { width: 100%; height: 100%; object-fit: contain; display: block; }
.img-prev-wide { width: 240px; height: 96px; }
.img-prev-square { width: 96px; height: 96px; }
@media (max-width: 520px) {
  .img-prev-wide { width: 100%; height: 120px; }
  .img-prev-square { width: 88px; height: 88px; }
}

@media print {
  .admin-side, .admin-bar, .admin-mobnav, .no-print { display: none !important; }
  .admin-body { padding: 0; }
}

/* ============================================================
   商品頁：手機底部固定購買列
   電腦版隱藏（右側欄已有購買按鈕）；手機版固定在底部，
   並以 .pd-bar-space 撐出等高空間，避免遮住頁面內容。
   ============================================================ */
.pd-desktop-buy { display: none; }
.pd-bar-space { display: none; }

@media (max-width: 900px) {
  .pd-desktop-buy {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: rgba(255, 249, 242, .97);
    backdrop-filter: saturate(140%) blur(6px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 14px rgba(56, 41, 32, .08);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .pd-desktop-buy .wrap { align-items: center; }
  .pd-desktop-buy .btn { padding: 10px 14px; font-size: 14px; }
  .pd-desktop-buy img { border-radius: var(--radius); }
  .pd-bar-space { display: block; height: 92px; }
}

/* ---- 補：商品頁兩欄版型 / 篩選面板 / 購物車明細 / Modal / 標題層級 ---- */
.pd-layout { display: grid; grid-template-columns: 1fr; }
@media (min-width: 901px) {
  .pd-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 0;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    align-items: start;
  }
  .pd-layout .pd-gallery { border-radius: var(--radius); overflow: hidden; }
  .pd-layout .pd-info { padding: 8px 0 8px 32px; }
}
@media (min-width: 1100px) {
  .pd-layout { gap: 40px; }
}

.filter-body { display: grid; gap: 14px; }
@media (min-width: 700px) {
  .filter-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .filter-body { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cart-info { min-width: 0; flex: 1; }
@media (max-width: 640px) {
  .cart-info { width: 100%; }
}

.modal-body { padding: 4px 2px 8px; }
.modal-body .kv-block:first-child { margin-top: 0; }

.t-h4 { font-family: var(--font-serif); font-size: 17px; font-weight: 500; line-height: 1.4; letter-spacing: .01em; }

/* ============================================================
   後台：首頁裝修
   ============================================================ */
.hb-list { display: flex; flex-direction: column; gap: 8px; }
.hb-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 12px 14px;
  transition: border-color .2s var(--ease), opacity .2s var(--ease);
}
.hb-row.is-off { opacity: .55; }
.hb-row.is-dragging { opacity: .35; }
.hb-row.is-over { border-color: var(--champagne); box-shadow: inset 0 0 0 1px var(--champagne-lt); }
.hb-grip {
  width: 14px; padding-top: 4px; cursor: grab;
  display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto;
}
.hb-grip:active { cursor: grabbing; }
.hb-grip span { display: block; height: 2px; border-radius: 2px; background: var(--line); }
.hb-main { flex: 1; min-width: 0; }
.hb-head { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--espresso); }
.hb-offtag {
  font-size: 11px; color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px;
}
.hb-desc { font-size: 12px; color: var(--text-mute); margin-top: 3px; line-height: 1.5; }
.hb-more { margin-top: 6px; }
.hb-more summary { font-size: 12px; color: var(--champagne-dk); cursor: pointer; }
.hb-ctl { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.hb-limit { width: auto; min-height: 34px; font-size: 12.5px; padding: 4px 26px 4px 9px; }
.hb-move { display: flex; gap: 2px; }
.hb-btn {
  width: 28px; height: 28px; font-size: 12px;
  border: 1px solid var(--line-soft); border-radius: 6px;
  display: grid; place-items: center; color: var(--text-soft); background: #fff;
}
.hb-btn:hover:not([disabled]) { border-color: var(--champagne); color: var(--espresso); }
.hb-btn[disabled] { opacity: .3; }
.hb-switch { position: relative; display: inline-flex; width: 40px; height: 22px; flex: 0 0 auto; cursor: pointer; }
.hb-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hb-switch span { position: absolute; inset: 0; background: var(--line); border-radius: 11px; transition: background .2s var(--ease); }
.hb-switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .2s var(--ease);
}
.hb-switch input:checked + span { background: var(--espresso); }
.hb-switch input:checked + span::after { transform: translateX(18px); }
.hb-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 14px;
}
@media (max-width: 620px) {
  .hb-row { flex-wrap: wrap; }
  .hb-ctl { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line-soft); padding-top: 8px; }
}

/* ============================================================
   後台：商品詳情編排
   ============================================================ */
.pblk-list { display: flex; flex-direction: column; gap: 10px; }
.pblk {
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  background: #fff; padding: 10px 12px 12px;
}
.pblk-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pblk-tag {
  font-size: 11.5px; letter-spacing: .08em; color: var(--champagne-dk);
  background: var(--blush-soft); border-radius: 20px; padding: 2px 10px;
}
.pblk-acts { display: flex; gap: 2px; }
.pblk-prev { margin-top: 8px; border-radius: var(--radius); overflow: hidden; background: var(--blush-soft); }
.pblk-prev img { width: 100%; max-height: 220px; object-fit: cover; display: block; }

/* ============================================================
   前台：商品詳情圖文（Product Story）
   ============================================================ */
.pd-detail { background: var(--cream); border-top: 1px solid var(--line-soft); }
/* 整段收成一個置中的編輯欄，圖片與文字同寬，不會一張圖撐滿整個螢幕 */
.pd-blocks { padding-top: 4px; max-width: 760px; margin: 0 auto; }
.pd-blk-text p.zh {
  font-size: 15px; line-height: 2; letter-spacing: .01em;
  color: var(--text-soft); margin-bottom: 8px;
}
.pd-blk-text p.vi {
  font-size: 13px; line-height: 1.85; font-style: italic;
  color: var(--text-mute); margin-bottom: 26px;
}
.pd-blk-head { margin: 30px 0 16px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.pd-blk-head:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pd-blk-head h3 {
  font-family: var(--font-serif); font-size: 21px; font-weight: 400;
  letter-spacing: .05em; color: var(--espresso); line-height: 1.5;
}
.pd-blk-head .t-vi { font-size: 12.5px; margin-top: 3px; }
.pd-blk-fig { margin: 0 0 28px; }
/* 不裁切：用原始比例完整顯示，商品圖被切掉比尺寸大更糟 */
.pd-blk-fig img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg); background: var(--blush-soft);
}
.pd-blk-fig figcaption {
  font-size: 12px; color: var(--text-mute); margin-top: 9px;
  letter-spacing: .02em; line-height: 1.6;
}
.pd-blk-fig figcaption .t-vi { display: block; font-size: 11.5px; margin-top: 2px; }
.pd-blk-list ul { margin: 0 0 14px; padding-left: 18px; }
.pd-blk-list li {
  list-style: disc; font-size: 14px; line-height: 1.95; color: var(--text-soft);
}
.pd-blk-list ul.vi li { font-size: 12.5px; font-style: italic; color: var(--text-mute); }
.pd-blk-list ul.vi { margin-bottom: 24px; }
@media (min-width: 1000px) {
  /* 桌機圖片略放大到欄寬外緣，視覺上比較有呼吸；但不再裁切 */
  .pd-blk-fig { margin-left: -32px; margin-right: -32px; }
}

/* ============================================================
   首頁：主視覺輪播（2 張以上才啟用）
   ============================================================ */
.hero-cs {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: 74vh;
  background: var(--blush-soft);
}
.hero-cs .hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .9s var(--ease);
  pointer-events: none;
}
.hero-cs .hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-cs .hero-slide > img { width: 100%; height: 100%; object-fit: cover; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 249, 242, .84);
  color: var(--espresso);
  font-size: 20px; line-height: 1;
  display: none; place-items: center;
  z-index: 4;
  transition: background .2s var(--ease);
}
.hero-arrow:hover { background: #fff; }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-dots {
  position: absolute; right: 18px; bottom: 22px;
  display: flex; gap: 7px; z-index: 4;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 1px 3px rgba(42, 31, 24, .35);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.hero-dots button.is-on { background: #fff; transform: scale(1.3); }
@media (min-width: 900px) {
  .hero-cs { aspect-ratio: 21 / 9; max-height: 80vh; }
  /* 箭頭與圓點集中到右下角：放左右中間會壓到標題與小標 */
  .hero-arrow { display: grid; top: auto; bottom: 22px; transform: none; }
  .hero-arrow.prev { left: auto; right: 62px; }
  .hero-arrow.next { right: 18px; }
  .hero-dots { right: 112px; bottom: 36px; }
}

/* ============================================================
   首頁：自訂圖文區塊
   ============================================================ */
.cblock { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: center; }
.cblock-media { border-radius: var(--radius-lg); overflow: hidden; background: var(--blush-soft); }
.cblock-media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.cblock-ph { aspect-ratio: 4 / 3; background: var(--blush-soft); }
.cblock-p {
  font-size: 14.5px; line-height: 1.95; color: var(--text-soft);
  margin-bottom: 8px; max-width: 520px;
}
.cblock-p.vi { font-size: 12.5px; font-style: italic; color: var(--text-mute); }
@media (min-width: 860px) {
  .cblock { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; }
  .cblock-media img, .cblock-ph { aspect-ratio: 4 / 5; }
  .cblock.is-flip .cblock-media { order: 2; }
}

/* 後台：自訂區塊表單 */
.hb-form { margin-top: 8px; }
.hb-thumb {
  margin-top: 8px; width: 180px; border-radius: var(--radius);
  overflow: hidden; background: var(--blush-soft);
}
.hb-thumb img { width: 100%; display: block; }

/* ============================================================
   前台：商品詳情影片
   ============================================================ */
.pd-blk-video { margin: 0 0 28px; }
.pd-blk-video iframe,
.pd-blk-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-lg);
  background: #000;
  display: block;
}
.pd-blk-video figcaption {
  font-size: 12px; color: var(--text-mute); margin-top: 9px; line-height: 1.6;
}
.pd-blk-video figcaption .t-vi { display: block; font-size: 11.5px; margin-top: 2px; }
@media (min-width: 1000px) {
  .pd-blk-video { margin-left: -32px; margin-right: -32px; }
}

/* ============================================================
   後台：首頁輪播加圖
   ============================================================ */
.bs-list { display: flex; flex-direction: column; gap: 10px; }
.bs-row {
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  background: #fff; padding: 10px 12px 12px;
}
.bs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bs-no {
  font-size: 11.5px; letter-spacing: .08em; color: var(--champagne-dk);
  background: var(--blush-soft); border-radius: 20px; padding: 2px 10px;
}
.bs-thumb {
  margin-top: 8px; width: 220px; border-radius: var(--radius);
  overflow: hidden; background: var(--blush-soft);
}
.bs-thumb img { width: 100%; display: block; }

/* ============================================================
   後台：商品編輯（單頁折疊式）
   ============================================================ */
.pe-sec-title {
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--champagne-dk); margin-bottom: 10px;
}
.req { color: #B5453A; margin-left: 2px; }
.input.has-error,
.select.has-error,
.textarea.has-error {
  border-color: #B5453A !important;
  box-shadow: 0 0 0 3px rgba(181, 69, 58, .12);
}
.pe-block {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.pe-more > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--champagne-dk);
  letter-spacing: .02em;
  padding: 4px 0;
  list-style: none;
}
.pe-more > summary::-webkit-details-marker { display: none; }
.pe-more > summary::before { content: "＋ "; }
.pe-more[open] > summary::before { content: "－ "; }
.pe-more[open] > summary { margin-bottom: 10px; }

/* ============================================================
   後台：二級導航
   ============================================================ */
.admin-subnav {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
  position: sticky; top: 0; z-index: 5;
}
.admin-subnav a {
  position: relative;
  padding: 12px 14px 11px;
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.admin-subnav a:hover { color: var(--espresso); }
.admin-subnav a.is-active { color: var(--espresso); }
.admin-subnav a.is-active::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--champagne); border-radius: 2px;
}
@media (max-width: 700px) {
  .admin-subnav { padding: 0 12px; overflow-x: auto; flex-wrap: nowrap; }
  .admin-subnav a { padding: 10px 11px; }
}

/* ============================================================
   後台側欄：統一成淺色
   舊的深色主題（.admin-side nav a 米白字）與後來的淺色底 .admin-side{background:#fff}
   同時存在，造成「白底米白字」、選中項白字白底完全看不見。
   這裡用更高的特異度（.admin-side .admin-nav a）覆蓋掉舊的深色設定。
   ============================================================ */
.admin-side .admin-nav a {
  color: var(--text-soft);
  background: transparent;
  border-left: 2px solid transparent;
}
.admin-side .admin-nav a:hover { color: var(--espresso); background: var(--cream-deep); }
.admin-side .admin-nav a.is-active {
  color: var(--espresso);
  background: var(--blush-soft);
  border-left-color: var(--champagne);
  font-weight: 500;
}
.admin-side .admin-nav a.is-active .ic { color: var(--champagne-dk); }
