/* =====================================================================
 * m/store.css — Mobile dedicated store page
 * 2026-05-05 (agitated-volhard)
 *
 * Mobile-first design language using dp-* shell from m/arcade.css +
 * m/marine-theme.css. Built for touch (≥44px tap targets), sticky
 * filter bar, 2-col product grid, native-app feel.
 *
 * IDs reuse store.js: storeGrid / storeSearch / storeSort /
 * storeCategoryHomeTabs / storeCategoryHomeTabsDrawer / etc.
 * ===================================================================== */

/* page shell */
body.dp-body--store {
  background-color: #050a1c;
  color: #f0fdff;
  min-height: 100svh;
  overflow-x: clip;
}

/* main scroll region — pushes above tabbar
   max-width: 480px to prevent giant cards on accidental desktop visit
   (mobile-dedicated page should look like mobile even on wide viewports) */
.dp-store-main {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  padding: 6px 12px calc(var(--dp-tabbar-h, 76px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================================================
 * STICKY HEADLINE BAR — page title under topbar
 * ============================================================ */
.dp-store-headline {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 4px;
}
.dp-store-headline__icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.42), rgba(8, 145, 178, 0.55));
  border: 1px solid rgba(165, 243, 252, 0.6);
  box-shadow:
    0 8px 18px rgba(34, 211, 238, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: grid;
  place-items: center;
  font-size: 19.8px;
  position: relative;
  overflow: hidden;
}
.dp-store-headline__icon::after {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(circle, rgba(165, 243, 252, 0.55) 0%, transparent 60%);
  filter: blur(8px);
  animation: dp-store-headline-pulse 3s ease-in-out infinite;
}
@keyframes dp-store-headline-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50%      { opacity: 0.95; transform: scale(1.08); }
}
.dp-store-headline__copy { display: grid; gap: 2px; }
.dp-store-headline__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: #67e8f9;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
}
.dp-store-headline__title {
  margin: 0;
  font-size: 20.9px;
  font-weight: 900;
  color: #f0fdff;
  letter-spacing: 0.04em;
  text-shadow: 0 0 14px rgba(103, 232, 249, 0.5);
}

/* ============================================================
 * QUICK ACTIONS row (我的訂單 / 購物車)
 * ============================================================ */
.dp-store-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dp-store-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px; /* thumb tap min */
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14.3px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  white-space: nowrap;
}
.dp-store-action--ghost {
  background: rgba(15, 30, 68, 0.7);
  border: 1px solid rgba(103, 232, 249, 0.34);
  color: #f0fdff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dp-store-action--ghost:active {
  transform: scale(0.97);
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(165, 243, 252, 0.62);
}
.dp-store-action--primary {
  background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
  border: 1px solid rgba(165, 243, 252, 0.6);
  color: #050a1c;
  box-shadow:
    0 8px 20px rgba(34, 211, 238, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
  gap: 8px;
}
.dp-store-action__badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #0a1633;
  font-size: 12.1px;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 2px #050a1c,
    0 4px 10px rgba(251, 191, 36, 0.55);
  /* gold ring for visibility against cyan CTA */
  border: 1.5px solid #fbbf24;
  animation: dp-store-badge-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes dp-store-badge-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.dp-store-action__badge[hidden] {
  display: none;
}
.dp-store-action--primary:active {
  transform: scale(0.97);
  filter: brightness(1.08);
}

/* ============================================================
 * STICKY FILTER BAR — search + sort + drawer trigger
 * ============================================================ */
.dp-store-filter-bar {
  position: sticky;
  top: 76px; /* dp-top has no defined --dp-top-h, real height ~72px + 4px gap */
  z-index: 5;
  background: rgba(10, 22, 51, 0.78);
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 16px;
  padding: 10px;
  display: grid;
  gap: 8px;
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  box-shadow:
    0 10px 24px rgba(5, 10, 28, 0.5),
    inset 0 1px 0 rgba(165, 243, 252, 0.1);
}
.dp-store-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 10, 28, 0.65);
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 12px;
  padding: 8px 12px;
  height: 42px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.dp-store-search:focus-within {
  border-color: #67e8f9;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25);
}
.dp-store-search__icon {
  flex: 0 0 auto;
  color: #67e8f9;
  display: grid;
  place-items: center;
}
.dp-store-search__input {
  flex: 1 1 auto;
  min-width: 0;
  align-self: stretch;
  min-height: 40px;
  line-height: 40px;
  border: 0;
  background: transparent;
  color: #f0fdff;
  /* iOS BUG fix: font-size <16px causes Safari to auto-zoom on tap. Keep ≥16. */
  font-size: 17.6px;
  outline: 0;
  font-family: inherit;
  padding: 0;
}
.dp-store-search__input::placeholder {
  color: rgba(240, 253, 255, 0.55);
}

.dp-store-filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.dp-store-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 36px 0 14px;
  background: rgba(5, 10, 28, 0.6);
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 12px;
  color: #f0fdff;
  /* iOS zoom-fix: select font-size ≥16px to prevent auto-zoom on tap */
  font-size: 17.6px;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%2367e8f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-family: inherit;
  width: 100%;
}
.dp-store-sort option {
  background: #0a1633;
  color: #f0fdff;
}
.dp-store-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  background: rgba(15, 30, 68, 0.7);
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 12px;
  color: #f0fdff;
  font-size: 14.3px;
  font-weight: 800;
  cursor: pointer;
  transition: all 180ms ease;
  font-family: inherit;
}
.dp-store-filter-trigger:active {
  transform: scale(0.96);
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(165, 243, 252, 0.6);
}
.dp-store-filter-trigger__count {
  background: #fbbf24;
  color: #0a1633;
  font-size: 11px;
  font-weight: 900;
  padding: 0 5px;
  border-radius: 8px;
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
}

/* ============================================================
 * CATEGORY GRID (mobile redesign 2026-05-08)
 *   舊版: horizontal scroll pills 看起來廉價, user complaint.
 *   新版: 4-col grid icon tiles (Shopee / momo / PChome 標準).
 *   - 每格 1:1 aspect, icon 圓形 marine 漸層底, 文字 12px below
 *   - active state cyan glow + 縮小 + 小角標
 *   - 子分類仍走橫向 chip (二級分類 fewer items + scroll OK)
 * ============================================================ */
.dp-store-cat-strip {
  margin: 4px 0 8px;
  padding: 4px 0 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
}

/* BUG #16 + #17 fix: [hidden] HTML attr (display: none) 被 class display:
   grid|flex 規則覆蓋. Audit 發現 mobile store.css 有以下 broken cases:
     #storeCategoryChildTabs (display:grid) → 顯示 12px empty row
     #storeEmpty (display:grid) → 隱藏狀態仍佔 251px space 在頁尾
   還有 below 子分類 chip override (display: flex) 也是同樣 chain. */
.dp-store-cat-strip[hidden],
.dp-store-empty[hidden] {
  display: none !important;
}

/* BUG #25 fix (Round 9 audit, 2026-05-08): 「篩選」 button (#storeMobileFilterBtn)
   開的 drawer 跟「全部商品 ▾」 trigger 一樣 (#storeDrawerPanel), drawer 內
   是分類樹 (不是 sort/filter UI). 兩個 button 開同一 drawer 但 label 不一致
   ("篩選" vs "分類") 用戶會困惑. trigger button 已是更明顯的入口, 隱藏多餘
   的「篩選」 button. (sort dropdown 仍保留, 因為功能不同) */
.dp-store-filter-trigger {
  display: none !important;
}

/* v45e (2026-05-08): User feedback — 4-col grid 在多子分類時雜亂.
   改成「選擇分類」trigger button + drawer modal 模式 (Shopee/momo 標準).
   inline grid (#storeCategoryHomeTabs / #storeCategoryChildTabs) 仍 render
   給 store.js track active state 用 — 但 CSS 完全隱藏不佔空間.
   實際分類選擇走 #storeMobileCategoryBtn → drawer 內 grid. */
.dp-store-cat-strip--inline-hidden {
  display: none !important;
}

/* trigger button — 取代原本 inline grid 的位置 */
.dp-store-cat-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 8px 0 10px;
  padding: 11px 14px;
  background: linear-gradient(180deg, rgba(15, 30, 68, 0.7) 0%, rgba(7, 16, 38, 0.85) 100%);
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 14px;
  color: rgba(240, 253, 255, 0.92);
  font-size: 15.4px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
}

.dp-store-cat-trigger:hover,
.dp-store-cat-trigger:focus-visible {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.16) 0%, rgba(14, 165, 233, 0.1) 100%);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 4px 14px -4px rgba(34, 211, 238, 0.32);
  outline: none;
}

.dp-store-cat-trigger:active {
  transform: scale(0.98);
}

.dp-store-cat-trigger__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32) 0%, rgba(14, 165, 233, 0.18) 100%);
  border: 1px solid rgba(34, 211, 238, 0.42);
  color: #22d3ee;
  flex-shrink: 0;
}

.dp-store-cat-trigger__label {
  flex: 1 1 auto;
  font-size: 15.4px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-store-cat-trigger__chevron {
  font-size: 15.4px;
  color: rgba(148, 163, 184, 0.85);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dp-store-cat-trigger[aria-expanded="true"] .dp-store-cat-trigger__chevron {
  transform: rotate(180deg);
  color: #22d3ee;
}

/* ============================================================
 * v45f drawer: compact category tree (全部 expanded, smaller)
 * User feedback v45e → v45f: 「可以直接展開子分類 所有的都直接顯示出來
 * 然後不用那麼大」
 * Implementation: store-cat-trigger.js fetches /api/product-categories
 * + builds compact tree, replacing drawer body content entirely.
 * The store.js-rendered #storeCategoryHomeTabsDrawer + ChildTabsDrawer
 * are no longer used — hidden in case they still render.
 * ============================================================ */
.dp-store-drawer__body #storeCategoryHomeTabsDrawer,
.dp-store-drawer__body #storeCategoryChildTabsDrawer {
  display: none !important;
}

.dp-cat-tree-loading {
  padding: 20px 12px;
  text-align: center;
  color: rgba(148, 163, 184, 0.85);
  font-size: 14.3px;
}

/* BUG #21 fix: API 失敗時的 retry UI */
.dp-cat-tree-error {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px 16px;
  gap: 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 12px;
}

.dp-cat-tree-error__msg {
  margin: 0;
  font-size: 14.3px;
  font-weight: 600;
  color: #fca5a5;
}

.dp-cat-tree-error__retry {
  appearance: none;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18) 0%, rgba(14, 165, 233, 0.12) 100%);
  border: 1px solid rgba(34, 211, 238, 0.55);
  color: #22d3ee;
  font-size: 14.3px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dp-cat-tree-error__retry:hover,
.dp-cat-tree-error__retry:focus-visible {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32) 0%, rgba(14, 165, 233, 0.22) 100%);
  border-color: rgba(34, 211, 238, 0.85);
  outline: none;
}

.dp-cat-tree {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 8px;
}

/* 「全部商品」 top button — slightly bigger/highlighted */
.dp-cat-tree__all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.18) 0%, rgba(234, 157, 34, 0.1) 100%);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 12px;
  color: #facc15;
  font-size: 15.4px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.dp-cat-tree__all:hover {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.28) 0%, rgba(234, 157, 34, 0.18) 100%);
  border-color: rgba(250, 204, 21, 0.65);
}

.dp-cat-tree__all:active {
  transform: scale(0.98);
}

.dp-cat-tree__all.is-active {
  background: linear-gradient(135deg, #facc15 0%, #ea9d22 100%);
  color: #0a1a3e;
  border-color: rgba(250, 204, 21, 0.85);
  box-shadow: 0 4px 14px -4px rgba(250, 204, 21, 0.45);
}

.dp-cat-tree__all-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.22);
  font-size: 17.6px;
  flex-shrink: 0;
}

.dp-cat-tree__all.is-active .dp-cat-tree__all-icon {
  background: rgba(10, 26, 62, 0.28);
}

.dp-cat-tree__all-name {
  flex: 1 1 auto;
}

.dp-cat-tree__all-count {
  font-size: 13.2px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.92);
  min-width: 28px;
  text-align: center;
}

.dp-cat-tree__all.is-active .dp-cat-tree__all-count {
  background: rgba(10, 26, 62, 0.42);
}

/* parent group */
.dp-cat-tree__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dp-cat-tree__group.is-empty {
  opacity: 0.45;
}

.dp-cat-tree__group-head {
  display: flex;
  align-items: stretch;
}

.dp-cat-tree__parent {
  display: flex;
  align-items: center;
  gap: 8px;
  /* BUG #20 fix: parent button 高度 ≥ 44px tap target */
  padding: 12px 12px;
  min-height: 44px;
  background: linear-gradient(180deg, rgba(15, 30, 68, 0.6) 0%, rgba(7, 16, 38, 0.78) 100%);
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 14.3px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.dp-cat-tree__parent::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  background: linear-gradient(180deg, #22d3ee 0%, #0ea5e9 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.dp-cat-tree__parent:hover {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.14) 0%, rgba(14, 165, 233, 0.08) 100%);
  border-color: rgba(34, 211, 238, 0.45);
}

.dp-cat-tree__parent:active {
  transform: scale(0.98);
}

.dp-cat-tree__parent.is-active {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.28) 0%, rgba(14, 165, 233, 0.18) 100%);
  border-color: rgba(34, 211, 238, 0.7);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.32);
}

.dp-cat-tree__parent-name {
  flex: 1 1 auto;
  font-size: 14.3px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-cat-tree__parent-count {
  font-size: 12.1px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
  color: #22d3ee;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.dp-cat-tree__parent.is-active .dp-cat-tree__parent-count {
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
}

/* children chips — flex wrap, ≥36px each */
.dp-cat-tree__children {
  display: flex;
  flex-wrap: wrap;
  /* BUG #20 fix: gap 5→8 增加 chip 之間呼吸空間 + 防止誤觸 */
  gap: 8px;
  padding: 0 4px 0 16px; /* 16px left indent under parent */
}

.dp-cat-tree__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* BUG #20 fix: chip 高度 ≥ 36px tap target (WCAG 44px 是 ideal, 36px
     是商城常見實際數值, 配合 5px gap 父子間距用戶仍可精準 tap) */
  padding: 9px 12px;
  min-height: 36px;
  /* BUG #23 fix: 限 max-width + overflow ellipsis, 防長分類名撐破 layout
     (e.g. 「智慧穿戴-隨身引擎」) */
  max-width: 100%;
  background: rgba(15, 30, 68, 0.45);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
  color: rgba(240, 253, 255, 0.85);
  font-size: 13.2px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  /* prevent text from spilling out */
  overflow: hidden;
}

.dp-cat-tree__chip:hover {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.4);
  color: #ffffff;
}

.dp-cat-tree__chip:active {
  transform: scale(0.94);
}

.dp-cat-tree__chip.is-active {
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
  border-color: rgba(165, 243, 252, 0.85);
  color: #0a1a3e;
  box-shadow: 0 2px 8px -2px rgba(34, 211, 238, 0.45);
}

.dp-cat-tree__chip.is-empty {
  opacity: 0.5;
}

.dp-cat-tree__chip-name {
  white-space: nowrap;
  /* BUG #23: 過長分類名 ellipsis 不撐破 chip */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9em; /* ~9 個中文字以內 */
}

.dp-cat-tree__chip-count {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  margin-left: 2px;
}

.dp-cat-tree__chip.is-active .dp-cat-tree__chip-count {
  color: #0a1a3e;
  opacity: 0.85;
}

/* legacy v45e drawer rules below — keep for fallback (not in new tree path)
   but they target the now-hidden #storeCategoryHomeTabsDrawer. Safe. */
.dp-store-drawer__body #storeCategoryHomeTabsDrawerLEGACY_v45e {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 0 12px;
  border-bottom: 1px dashed rgba(103, 232, 249, 0.2);
  margin-bottom: 12px;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 10px 6px 8px;
  height: auto;
  min-height: 0;
  background: linear-gradient(180deg, rgba(15, 30, 68, 0.55) 0%, rgba(7, 16, 38, 0.78) 100%);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 12px;
  color: rgba(240, 253, 255, 0.92);
  font-size: 13.2px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.18s ease, background 0.18s ease;
  text-align: center;
  word-break: keep-all;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32) 0%, rgba(14, 165, 233, 0.18) 100%);
  border: 1px solid rgba(34, 211, 238, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17.6px;
  line-height: 1;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab__icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab--all .store-category-tab__icon {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.46) 0%, rgba(234, 157, 34, 0.24) 100%);
  border-color: rgba(250, 204, 21, 0.55);
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab__label {
  font-size: 13.2px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab__count {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.46);
  color: rgba(255, 255, 255, 0.92);
  min-width: 18px;
  text-align: center;
  line-height: 1.3;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab__chevron {
  display: none;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab.has-children::after {
  content: "";
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.6);
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab.is-active,
.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.22) 0%, rgba(14, 165, 233, 0.14) 100%);
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.32);
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab.is-active .store-category-tab__icon {
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
  border-color: rgba(165, 243, 252, 0.86);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab.is-empty {
  opacity: 0.5;
}

.dp-store-drawer__body #storeCategoryHomeTabsDrawer .store-category-tab.is-empty .store-category-tab__icon {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.22) 0%, rgba(100, 116, 139, 0.14) 100%);
  border-color: rgba(148, 163, 184, 0.32);
}

/* drawer child tabs — 子分類 row layout (chip pattern, scroll horiz if 太多) */
.dp-store-drawer__body #storeCategoryChildTabsDrawer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}

.dp-store-drawer__body #storeCategoryChildTabsDrawer[hidden] {
  display: none !important;
}

.dp-store-drawer__body #storeCategoryChildTabsDrawer::before {
  content: "子分類";
  font-size: 12.1px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(34, 211, 238, 0.85);
  padding: 0 4px;
  margin-bottom: 4px;
}

.dp-store-drawer__body #storeCategoryChildTabsDrawer .store-category-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(15, 30, 68, 0.55);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 10px;
  color: rgba(240, 253, 255, 0.92);
  font-size: 14.3px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dp-store-drawer__body #storeCategoryChildTabsDrawer .store-category-tab__icon {
  display: none;
}

.dp-store-drawer__body #storeCategoryChildTabsDrawer .store-category-tab__chevron {
  display: none;
}

.dp-store-drawer__body #storeCategoryChildTabsDrawer .store-category-tab__count {
  margin-left: auto;
  font-size: 12.1px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  color: #22d3ee;
  font-weight: 700;
}

.dp-store-drawer__body #storeCategoryChildTabsDrawer .store-category-tab.is-active,
.dp-store-drawer__body #storeCategoryChildTabsDrawer .store-category-tab[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.22) 0%, rgba(14, 165, 233, 0.14) 100%);
  border-color: rgba(34, 211, 238, 0.55);
  color: #ffffff;
}

/* override store.js' default tab styling for icon-tile look.
   store.js renders each tab as:
     <button.store-category-tab>
       <span.store-category-tab__icon><img preset-icon ...></span>
       <span.store-category-tab__label>全部商品</span>
       <span.store-category-tab__count>200</span>
     </button>
   We restyle these existing spans into a vertical icon-on-top tile. */
.dp-store-cat-strip .store-category-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 10px 6px 8px;
  height: auto;
  min-height: 0;
  background: linear-gradient(180deg, rgba(15, 30, 68, 0.55) 0%, rgba(7, 16, 38, 0.78) 100%);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 14px;
  color: rgba(240, 253, 255, 0.92);
  font-size: 13.2px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  text-align: center;
  word-break: keep-all;
}

/* icon container: the existing __icon span — make it a 38px circle */
.dp-store-cat-strip .store-category-tab__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32) 0%, rgba(14, 165, 233, 0.18) 100%);
  border: 1px solid rgba(34, 211, 238, 0.42);
  box-shadow: 0 4px 10px -4px rgba(34, 211, 238, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 19.8px;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* the img/preset glyph inside icon container — 22x22 inside 38px circle */
.dp-store-cat-strip .store-category-tab__icon img,
.dp-store-cat-strip .store-category-tab__icon svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* label below icon */
.dp-store-cat-strip .store-category-tab__label {
  display: block;
  font-size: 13.2px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* hide chevron on mobile grid (has-children tabs render an extra
   .__chevron `▾` which inflates row height in column flex layout).
   Keep it accessible only inside the drawer (#storeCategoryHomeTabsDrawer)
   where the row layout still makes sense. */
.dp-store-cat-strip#storeCategoryHomeTabs .store-category-tab__chevron {
  display: none;
}

/* show a small "▸" indicator on bottom-right corner if has-children */
.dp-store-cat-strip#storeCategoryHomeTabs .store-category-tab.has-children::after {
  content: "";
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.6);
}

/* 「全部」分類 icon 用 gold 區隔 */
.dp-store-cat-strip .store-category-tab--all .store-category-tab__icon {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.46) 0%, rgba(234, 157, 34, 0.24) 100%);
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 4px 10px -4px rgba(250, 204, 21, 0.4);
}

/* tile active state — cyan glow rim */
.dp-store-cat-strip .store-category-tab:active {
  transform: scale(0.95);
}

.dp-store-cat-strip .store-category-tab.is-active,
.dp-store-cat-strip .store-category-tab[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.22) 0%, rgba(14, 165, 233, 0.14) 100%);
  border-color: rgba(34, 211, 238, 0.65);
  color: #ffffff;
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.32),
    0 8px 18px -6px rgba(34, 211, 238, 0.45);
}

.dp-store-cat-strip .store-category-tab.is-active .store-category-tab__icon,
.dp-store-cat-strip .store-category-tab[aria-selected="true"] .store-category-tab__icon {
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
  border-color: rgba(165, 243, 252, 0.86);
  box-shadow:
    0 0 12px rgba(34, 211, 238, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

/* empty category (no products) → dimmed but still tappable */
.dp-store-cat-strip .store-category-tab.is-empty {
  opacity: 0.5;
}

.dp-store-cat-strip .store-category-tab.is-empty .store-category-tab__icon {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.22) 0%, rgba(100, 116, 139, 0.14) 100%);
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: none;
}

/* count badge top-right corner */
.dp-store-cat-strip .store-category-tab__count {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.46);
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0;
  min-width: 18px;
  text-align: center;
  line-height: 1.3;
}

.dp-store-cat-strip .store-category-tab.is-active .store-category-tab__count,
.dp-store-cat-strip .store-category-tab[aria-selected="true"] .store-category-tab__count {
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
}

/* Sub-category strip (二級分類) — 仍走 horizontal scroll chip pattern,
   因為通常項目不多 + 二級分類常隱藏, grid 太佔空間 */
.dp-store-cat-strip#storeCategoryChildTabs {
  display: flex;
  grid-template-columns: none;
  gap: 6px;
  padding: 4px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.dp-store-cat-strip#storeCategoryChildTabs::-webkit-scrollbar { display: none; }

.dp-store-cat-strip#storeCategoryChildTabs > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 0;
}

.dp-store-cat-strip#storeCategoryChildTabs .store-category-tab {
  flex-direction: row;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13.2px;
  gap: 4px;
}

.dp-store-cat-strip#storeCategoryChildTabs .store-category-tab::before {
  display: none; /* no icon circle on sub-cat chips */
}

.dp-store-cat-strip#storeCategoryChildTabs .store-category-tab__count {
  position: static;
  background: transparent;
  padding: 0;
  font-size: 12.1px;
  opacity: 0.78;
}

/* breadcrumb on mobile */
.dp-store-breadcrumb {
  margin: 0;
  padding: 6px 12px;
  background: rgba(15, 30, 68, 0.55);
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  font-size: 13.2px;
  color: rgba(240, 253, 255, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  flex-wrap: wrap;
}
.dp-store-breadcrumb[hidden] { display: none; }
.dp-store-breadcrumb .store-category-breadcrumb__seg {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
}
.dp-store-breadcrumb .store-category-breadcrumb__seg.is-current {
  color: #67e8f9;
  font-weight: 700;
}
.dp-store-breadcrumb .store-category-breadcrumb__sep {
  color: rgba(103, 232, 249, 0.45);
}

.dp-store-results-meta {
  font-size: 13.2px;
  color: rgba(240, 253, 255, 0.66);
  letter-spacing: 0.04em;
  padding: 0 4px;
}

/* ============================================================
 * 2-COL PRODUCT GRID (override store.js' v2 card on mobile)
 * ============================================================ */
.dp-store-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.dp-store-grid .store-card-v2 {
  background: linear-gradient(180deg, rgba(15, 30, 68, 0.78), rgba(10, 22, 51, 0.92)) !important;
  border: 1px solid rgba(103, 232, 249, 0.24) !important;
  border-radius: 14px !important;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 10px 22px rgba(5, 10, 28, 0.45),
    inset 0 1px 0 rgba(165, 243, 252, 0.1) !important;
  position: relative;
  transition: transform 220ms ease, box-shadow 240ms ease;
}
.dp-store-grid .store-card-v2:active {
  transform: scale(0.98);
  border-color: rgba(103, 232, 249, 0.55) !important;
  box-shadow:
    0 12px 28px rgba(5, 10, 28, 0.55),
    0 0 18px rgba(34, 211, 238, 0.32) !important;
}
.dp-store-grid .store-card-v2__media {
  aspect-ratio: 1 / 1 !important;
  background-size: cover !important;
  background-position: center !important;
  background-color: rgba(10, 22, 51, 0.78) !important;
  border-bottom: 1px solid rgba(103, 232, 249, 0.18);
  position: relative;
}
.dp-store-grid .store-card-v2__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(103, 232, 249, 0.35);
  letter-spacing: 0.32em;
  font-weight: 800;
  font-size: 14.3px;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
}
.dp-store-grid .store-card-v2__price {
  position: absolute;
  top: 8px; left: 8px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(245, 158, 11, 0.96)) !important;
  color: #0a1633 !important;
  border: 1px solid rgba(254, 243, 199, 0.55) !important;
  border-radius: 999px !important;
  padding: 4px 10px !important;
  font-weight: 900 !important;
  font-size: 12.1px !important;
  letter-spacing: 0.04em;
  box-shadow:
    0 4px 12px rgba(251, 191, 36, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.dp-store-grid .store-card-v2__quick-actions {
  position: absolute;
  top: 8px; right: 8px;
  display: flex;
  gap: 4px;
}
.dp-store-grid .store-quick-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(10, 22, 51, 0.82);
  border: 1px solid rgba(103, 232, 249, 0.4);
  color: #f0fdff;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dp-store-grid .store-quick-btn:active {
  background: rgba(34, 211, 238, 0.22);
  transform: scale(0.92);
}
.dp-store-grid .store-card-v2__badges {
  position: absolute;
  bottom: 6px; left: 6px; right: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.dp-store-grid .store-card-v2__badges .store-badge {
  background: rgba(251, 191, 36, 0.95);
  color: #0a1633;
  border: 1px solid rgba(254, 243, 199, 0.55);
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(251, 191, 36, 0.4);
}
.dp-store-grid .store-card-v2__body {
  padding: 10px !important;
  display: grid;
  gap: 6px !important;
}
.dp-store-grid .store-card-v2__tags {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.dp-store-grid .store-card-v2__tags .store-tag,
.dp-store-grid .store-card-v2__tags .store-chip,
.dp-store-grid .store-tag,
.dp-store-grid .store-chip {
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(103, 232, 249, 0.3);
  color: #67e8f9;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.dp-store-grid .store-card-v2__headline h3 {
  margin: 0;
  color: #f0fdff;
  font-size: 14.3px;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dp-store-grid .store-card-v2__subtitle,
.dp-store-grid .store-card-v2__summary {
  margin: 0;
  color: rgba(240, 253, 255, 0.66);
  font-size: 12.1px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dp-store-grid .store-stock {
  background: rgba(5, 10, 28, 0.45);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 8px;
  padding: 6px 8px;
  display: grid; gap: 4px;
}
.dp-store-grid .store-stock__meta {
  display: flex; justify-content: space-between;
  color: rgba(240, 253, 255, 0.7);
  font-size: 11px;
}
.dp-store-grid .store-stock__meta strong {
  color: #f0fdff;
  font-weight: 800;
  font-size: 12.1px;
}
.dp-store-grid .store-stock__bar {
  height: 4px;
  background: rgba(15, 30, 68, 0.85);
  border-radius: 999px;
  overflow: hidden;
}
.dp-store-grid .store-stock__bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #67e8f9);
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.5);
}
.dp-store-grid .store-stock__bar.is-low > span {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.dp-store-grid .store-stock__bar.is-critical > span {
  background: linear-gradient(90deg, #ef4444, #f87171);
}
.dp-store-grid .store-card-v2__actions {
  display: flex;
  gap: 6px;
  flex-direction: column;
  margin-top: 2px;
}
.dp-store-grid .store-card-v2__actions .btn {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  font-size: 13.2px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(103, 232, 249, 0.4);
  background: rgba(15, 30, 68, 0.6);
  color: #f0fdff;
  transition: all 180ms ease;
  cursor: pointer;
}
.dp-store-grid .store-card-v2__actions .btn.primary {
  background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
  border-color: rgba(165, 243, 252, 0.6);
  color: #050a1c;
  box-shadow: 0 6px 14px rgba(34, 211, 238, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.dp-store-grid .store-card-v2__actions .btn:active {
  transform: scale(0.97);
}
.dp-store-grid .store-card-v2__actions .btn:disabled {
  background: rgba(60, 80, 110, 0.65);
  color: rgba(255, 255, 255, 0.45);
  border-color: rgba(120, 140, 165, 0.4);
  box-shadow: none;
  cursor: not-allowed;
}
/* hide list-mode meta on mobile (grid only on mobile) */
.dp-store-grid .store-card-v2__list-meta { display: none; }
.dp-store-grid .store-card-v2__price--inline { display: none; }
/* hide tap target hit overlay link's default styling */
.dp-store-grid .store-card-v2__hit { z-index: 1; }

/* skeleton variant */
.dp-store-grid .store-card-v2--skeleton .store-card-v2__media,
.dp-store-grid .store-card-v2--skeleton .store-card-v2__line {
  background: linear-gradient(90deg, rgba(15, 30, 68, 0.55) 0%, rgba(34, 211, 238, 0.18) 50%, rgba(15, 30, 68, 0.55) 100%);
  background-size: 200% 100%;
  animation: dp-store-shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes dp-store-shimmer {
  0%, 100% { background-position: 200% 0; }
  50%      { background-position: -200% 0; }
}

/* ============================================================
 * EMPTY STATE + PAGINATION
 * ============================================================ */
.dp-store-empty {
  background: rgba(15, 30, 68, 0.55);
  border: 1px dashed rgba(103, 232, 249, 0.32);
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
  color: rgba(240, 253, 255, 0.78);
  display: grid;
  gap: 10px;
  justify-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dp-store-empty__icon {
  font-size: 35.2px;
  color: #67e8f9;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
}
.dp-store-empty__text {
  margin: 0;
  font-size: 15.4px;
}
.dp-store-empty__clear {
  background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
  color: #050a1c;
  border: 1px solid rgba(165, 243, 252, 0.55);
  font-weight: 800;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14.3px;
  box-shadow: 0 6px 14px rgba(34, 211, 238, 0.4);
}

.dp-store-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px 0 0;
}
.dp-store-pagination button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: rgba(15, 30, 68, 0.6);
  border: 1px solid rgba(103, 232, 249, 0.28);
  color: rgba(240, 253, 255, 0.85);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14.3px;
  font-weight: 700;
  transition: all 180ms ease;
}
.dp-store-pagination button:active {
  transform: scale(0.93);
}
.dp-store-pagination button.is-active,
.dp-store-pagination button[aria-current="page"] {
  background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
  color: #050a1c;
  border-color: rgba(165, 243, 252, 0.6);
  box-shadow: 0 4px 10px rgba(34, 211, 238, 0.4);
}

/* ============================================================
 * MOBILE DRAWER (filter / category)
 * ============================================================ */
.dp-store-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.dp-store-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.dp-store-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  width: min(86vw, 340px);
  background: linear-gradient(180deg, rgba(15, 30, 68, 0.97), rgba(10, 22, 51, 0.99));
  border-left: 1px solid rgba(103, 232, 249, 0.36);
  box-shadow: -16px 0 36px rgba(5, 10, 28, 0.7);
  display: flex;
  flex-direction: column;
  padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 18px);
  visibility: hidden;
  transform: translateX(100%);
  pointer-events: none;
}
body.dp-body--store .dp-store-drawer.is-open {
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}
/* lock body scroll while drawer open (store.js toggles body.store-drawer-open) */
body.store-drawer-open,
html:has(body.store-drawer-open) {
  overflow: hidden;
  touch-action: none;
}

/* a11y focus indicators — WCAG 2.4.7 Focus Visible */
.dp-store-action:focus-visible,
.dp-store-filter-trigger:focus-visible,
.dp-store-sort:focus-visible,
.dp-store-search:focus-within,
.dp-store-drawer__close:focus-visible,
.dp-store-empty__clear:focus-visible,
.dp-store-pagination button:focus-visible,
.dp-store-cat-strip .store-category-tab:focus-visible,
.dp-store-drawer__body .store-category-tab:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.28);
}
.dp-store-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 14px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.18);
  margin-bottom: 12px;
}
.dp-store-drawer__head h2 {
  margin: 0;
  font-size: 17.6px;
  font-weight: 900;
  color: #f0fdff;
  letter-spacing: 0.06em;
}
.dp-store-drawer__close {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(10, 22, 51, 0.75);
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 50%;
  color: #f0fdff;
  cursor: pointer;
  font-size: 17.6px;
  font-family: inherit;
}
.dp-store-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.dp-store-drawer__body .store-category-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  height: 48px;
  background: rgba(10, 22, 51, 0.65);
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 12px;
  color: rgba(240, 253, 255, 0.85);
  font-size: 15.4px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.dp-store-drawer__body .store-category-tab.is-active,
.dp-store-drawer__body .store-category-tab[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.32), rgba(8, 145, 178, 0.42));
  border-color: rgba(165, 243, 252, 0.65);
  color: #f0fdff;
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.36);
}
.dp-store-drawer__body .store-category-tab:active {
  transform: scale(0.98);
}
.dp-store-drawer__body .store-category-tabs-row--child {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(103, 232, 249, 0.18);
}
.dp-store-drawer__body .store-category-tabs-row--child[hidden] {
  display: none;
}

/* ============================================================
 * MESSAGE / TOAST
 * ============================================================ */
.dp-store-message {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14.3px;
  text-align: center;
  background: rgba(15, 30, 68, 0.55);
  border: 1px solid rgba(103, 232, 249, 0.22);
  color: rgba(240, 253, 255, 0.85);
}
.dp-store-message:empty {
  display: none;
}
.dp-store-message[data-status="error"] {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fda4af;
}
.dp-store-message[data-status="success"] {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.42);
  color: #6ee7b7;
}

/* hide desktop view-toggle (mobile is always grid) */
.dp-store-main [data-view-mode] {
  display: none !important;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .dp-store-grid .store-card-v2,
  .dp-store-action,
  .dp-store-filter-trigger,
  .dp-store-cat-strip .store-category-tab {
    transition: none;
  }
  .dp-store-headline__icon::after { animation: none; }
}

/* ──────────────────────────────────────────────────────────
   Phase B #6 (2026-05-08): Pull-to-refresh indicator on /m/store.
   Self-contained marine pill (item-page.css not loaded here).
   ────────────────────────────────────────────────────────── */
body.dp-body--store .dp-mode-ptr {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  margin-top: -50px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(15, 30, 68, 0.95));
  border: 1px solid rgba(116, 245, 255, 0.6);
  border-radius: 999px;
  color: #f0fdff;
  font-size: 13.2px;
  font-weight: 800;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1), opacity 200ms ease;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
body.dp-body--store .dp-mode-ptr__spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #f0fdff;
  border-radius: 50%;
  transition: transform 220ms ease;
}
body.dp-body--store .dp-mode-ptr[data-state="ready"] .dp-mode-ptr__spinner {
  transform: rotate(180deg);
}
body.dp-body--store .dp-mode-ptr[data-state="refreshing"] .dp-mode-ptr__spinner {
  animation: m-store-ptr-spin 0.8s linear infinite;
}
@keyframes m-store-ptr-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  body.dp-body--store .dp-mode-ptr,
  body.dp-body--store .dp-mode-ptr__spinner { transition: none; }
  body.dp-body--store .dp-mode-ptr[data-state="refreshing"] .dp-mode-ptr__spinner { animation: none; }
}

/* ============================================================================
   BUG L1 fix v9 (2026-05-09 condescending-goldberg, scope expansion 接班):
   隱藏 site-audio.js 自動注入的 right-bottom 音樂 FAB on /m/store.

   根因:
     pwa.js auto-inject site-audio.js 在所有 user page → 後者在 body 加
     position: fixed; right:20px; bottom:20px 的 .site-audio-fab 浮按鈕。
     site-audio.js line 1267 只 skip when 頁面有 .site-music-toggle (pwa.js
     mountButton 在 .topbar-actions 內 mount, 桌機 only). 手機 /m/* 沒
     .topbar-actions → site-audio.js fallthrough → buildControl → 顯示 FAB.

   既有 store-phase-8-9-10.css 雖有同款 hide rule (`body.dp-body--store
   .site-audio-fab { display:none }`) 但該 CSS 只被 profile/wishlist.html
   引入, 沒被 m/store.html 載 → 規則永遠不觸發.

   修法:
     直接把 hide rule 抄進 m/store.css (m/store.html 一定會載),
     scope 限 dp-body--store, 不影響其他頁.

   User feedback (2026-05-09): 「商場的右下角有一個音樂按鈕 不對吧
                                 怎麼會有那種東西」
   ============================================================================ */
body.dp-body--store .site-audio-fab,
body.dp-body--store .site-audio-panel,
body.dp-body--store .site-audio-wrap {
  display: none !important;
}
