﻿/* ============================================================
   plan-v2.css — 商品總覽 plan.aspx 新版套版專用
   - 對應 demo\plan_demo.html(2026-05-19)
   - 全部 class 加 iv2- 前綴,scope 在 .iv2-root 內
   - 不動 reset / 全域 typography / Bootstrap .container .row,避免汙染其他頁
   ============================================================ */

.iv2-root {
  --iv2-brand-navy: #0a1530;
  --iv2-brand-navy-mid: #1a2a52;
  --iv2-primary: #5645d4;
  --iv2-primary-pressed: #4534b3;
  --iv2-primary-deep: #3a2a99;
  --iv2-primary-soft: #ece9fb;
  --iv2-accent-red: #ff385c;
  --iv2-accent-amber: #f5d75e;
  --iv2-success: #1aae39;
  --iv2-warning: #dd5b00;
  --iv2-canvas: #ffffff;
  --iv2-surface: #f6f5f4;
  --iv2-surface-soft: #fafaf9;
  --iv2-hairline: #e5e3df;
  --iv2-hairline-soft: #ede9e4;
  --iv2-hairline-strong: #c8c4be;
  --iv2-ink: #1a1a1a;
  --iv2-charcoal: #37352f;
  --iv2-slate: #5d5b54;
  --iv2-muted: #bbb8b1;
  --iv2-tint-peach: #ffe8d4;
  --iv2-tint-mint: #d9f3e1;
  --iv2-tint-lavender: #e6e0f5;
  --iv2-tint-sky: #dcecfa;
  --iv2-tint-yellow: #fef7d6;
  --iv2-r-sm: 10px;
  --iv2-r-md: 14px;
  --iv2-r-lg: 20px;
  --iv2-r-pill: 999px;
  --iv2-s-2: 8px;
  --iv2-s-3: 12px;
  --iv2-s-4: 16px;
  --iv2-s-5: 24px;
  --iv2-s-6: 32px;
  --iv2-s-7: 48px;
  --iv2-s-8: 64px;
  --iv2-s-9: 96px;
  /* v2.11: 陰影 token 微提升,全公開頁一致,卡片更有浮起深度感 */
  --iv2-shadow-sm: 0 2px 5px rgba(15,23,48,0.07);
  --iv2-shadow-md: 0 6px 16px rgba(15,23,48,0.10);
  --iv2-shadow-lg: 0 16px 40px rgba(15,23,48,0.15);
  --iv2-font: 'Noto Sans Traditional Chinese', 'Noto Sans TC', 'Noto Sans CJK TC', 'Microsoft JhengHei', PingFangTC, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  font-family: var(--iv2-font);
  font-size: 17px;
  color: var(--iv2-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* plan.aspx 本頁:body / nav / footer 一併套 Noto Sans Traditional Chinese
   (只作用於此頁,因為 plan-v2.css 僅 plan.aspx 載入) */
body,
body button,
body input,
body select,
body textarea {
  font-family: 'Noto Sans Traditional Chinese', 'Noto Sans TC', 'Noto Sans CJK TC', 'Microsoft JhengHei', PingFangTC, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.iv2-root * { box-sizing: border-box; }
.iv2-root img,
.iv2-root svg { display: block; max-width: 100%; }
.iv2-root a { color: inherit; text-decoration: none; }
.iv2-root ul { padding: 0; margin: 0; list-style: none; }
.iv2-root h1,
.iv2-root h2,
.iv2-root h3,
.iv2-root h4,
.iv2-root p { margin: 0; }
.iv2-root button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.iv2-root input { font: inherit; }

/* container */
/* 寬度占比:電腦 80% / 平板 90% / 手機 100% */
.iv2-root .iv2-wrap { width: 80%; max-width: none; margin-inline: auto; padding-inline: var(--iv2-s-5); }
@media (max-width: 1024px) { .iv2-root .iv2-wrap { width: 90%; } }
@media (max-width: 600px) {
  .iv2-root .iv2-wrap { width: 100%; padding-inline: 14px; }
}

/* Typography */
.iv2-root .iv2-eyebrow { font-size: 0.85em; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--iv2-primary); }
.iv2-root .iv2-h1 { font-size: clamp(28px, 18px + 1.8vw, 40px); font-weight: 700; line-height: 1.2; color: var(--iv2-ink); margin: 0; }
.iv2-root .iv2-lead { font-size: 1.05em; line-height: 1.65; color: var(--iv2-slate); }

/* ============ page-head ============ */
.iv2-root .iv2-page-head {
  background: linear-gradient(180deg, var(--iv2-surface) 0%, var(--iv2-canvas) 100%);
  padding-block: var(--iv2-s-7) var(--iv2-s-6);
  border-bottom: 1px solid var(--iv2-hairline);
}
.iv2-root .iv2-crumb { font-size: 0.85em; color: var(--iv2-slate); }
.iv2-root .iv2-crumb a:hover { color: var(--iv2-primary); }
.iv2-root .iv2-crumb .sep { margin: 0 8px; color: var(--iv2-muted); }

/* 麵包屑列:左 crumb + 右 購物 Q&A(獨立區塊,桌機 / 手機都置頂) */
.iv2-root .iv2-page-utility {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.iv2-root .iv2-page-title-row {
  display: flex; align-items: end; justify-content: space-between;
  gap: var(--iv2-s-5); margin-top: var(--iv2-s-3); flex-wrap: wrap;
}
.iv2-root .iv2-page-title-row .iv2-h1 { margin-top: 10px; }
.iv2-root .iv2-page-title-row .iv2-lead { margin-top: 10px; max-width: 600px; }

.iv2-root .iv2-search-bar {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 18px;
  background: #fff; border: 1px solid var(--iv2-hairline-strong);
  border-radius: var(--iv2-r-pill);
  min-width: 320px; max-width: 100%;
  box-shadow: var(--iv2-shadow-sm);
}
@media (max-width: 600px) {
  .iv2-root .iv2-search-bar { min-width: 0; width: 100%; height: 46px; }
}
.iv2-root .iv2-search-bar:focus-within {
  border-color: var(--iv2-primary);
  box-shadow: 0 0 0 4px var(--iv2-primary-soft);
}
.iv2-root .iv2-search-bar input {
  border: none; outline: none; font: inherit; width: 100%;
  background: transparent; font-size: 0.95em;
}
.iv2-root .iv2-search-bar svg {
  width: 18px; height: 18px; stroke: var(--iv2-slate);
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.iv2-root .iv2-search-bar button {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--iv2-slate);
}
.iv2-root .iv2-search-bar button:hover { color: var(--iv2-primary); background: var(--iv2-primary-soft); }

/* ============ shop-layout ============ */
.iv2-root .iv2-shop-layout {
  display: grid; grid-template-columns: 280px 1fr;
  gap: var(--iv2-s-6);
  align-items: start;
  padding-block: var(--iv2-s-6) var(--iv2-s-8);
}
@media (max-width: 900px) {
  .iv2-root .iv2-shop-layout {
    grid-template-columns: 1fr; gap: 0;
    padding-block: var(--iv2-s-4) var(--iv2-s-7);
  }
}

/* ============ 手機版頂部工具列(預設隱藏,< 900px 顯示) ============ */
.iv2-root .iv2-mobile-toolbar { display: none; }
@media (max-width: 900px) {
  .iv2-root .iv2-mobile-toolbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: sticky; top: 64px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-bottom: 1px solid var(--iv2-hairline);
    z-index: 40;
    margin-inline: -14px;
  }
  @media (min-width: 601px) {
    .iv2-root .iv2-mobile-toolbar {
      margin-inline: calc(var(--iv2-s-5) * -1);
      padding-inline: var(--iv2-s-5);
    }
  }
  .iv2-root .iv2-mobile-toolbar button {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 16px;
    border-radius: var(--iv2-r-pill);
    background: #fff;
    border: 1px solid var(--iv2-hairline-strong);
    color: var(--iv2-charcoal);
    font-weight: 600; font-size: 0.92em;
    font-family: inherit; cursor: pointer;
  }
  .iv2-root .iv2-mobile-toolbar button:active { transform: scale(0.97); }
  .iv2-root .iv2-mobile-toolbar button svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
  .iv2-root .iv2-mobile-toolbar button .count {
    background: var(--iv2-primary); color: #fff;
    padding: 1px 8px; border-radius: 999px; font-size: 0.78em;
  }
}

/* ============ filter-panel(左:桌機 / 手機:右側抽屜)============ */
.iv2-root .iv2-filter-panel {
  position: sticky; top: 90px;
  background: var(--iv2-canvas);
  border: 1px solid var(--iv2-hairline);
  border-radius: var(--iv2-r-md);
  padding: var(--iv2-s-5);
  /* 桌機:篩選項目過多時面板內部自帶捲軸,且滾輪不外溢到商品頁 */
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Firefox 細捲軸 + 品牌色 */
  scrollbar-width: thin;
  scrollbar-color: var(--iv2-primary) transparent;
}
/* WebKit(Chrome / Edge / Safari)細捲軸 + 品牌色 */
.iv2-root .iv2-filter-panel::-webkit-scrollbar { width: 8px; }
.iv2-root .iv2-filter-panel::-webkit-scrollbar-track { background: transparent; }
.iv2-root .iv2-filter-panel::-webkit-scrollbar-thumb {
  background: var(--iv2-hairline-strong);
  border-radius: var(--iv2-r-pill);
}
.iv2-root .iv2-filter-panel:hover::-webkit-scrollbar-thumb { background: var(--iv2-primary); }
.iv2-root .iv2-filter-panel-head { display: none; }
.iv2-root .iv2-filter-panel-footer { display: none; }

@media (max-width: 900px) {
  .iv2-root .iv2-filter-panel {
    position: fixed; top: 0; bottom: 0; right: 0;
    width: min(90vw, 360px);
    border-radius: 0; border: none;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
    z-index: 1001;
    /* 手機抽屜:還原桌機 max-height,維持滿版高度 */
    max-height: none;
    overflow-y: auto; padding: 0;
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
    display: flex; flex-direction: column;
  }
  .iv2-root .iv2-filter-panel.is-open { transform: translateX(0); }
  .iv2-root .iv2-filter-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--iv2-hairline);
    background: #fff;
    position: sticky; top: 0; z-index: 2;
  }
  .iv2-root .iv2-filter-panel-head .iv2-title { font-size: 1.05em; font-weight: 700; color: var(--iv2-brand-navy); }
  .iv2-root .iv2-filter-panel-head .iv2-close {
    width: 36px; height: 36px; display: grid; place-items: center;
    border-radius: 50%; background: var(--iv2-surface);
    border: none; cursor: pointer;
  }
  .iv2-root .iv2-filter-panel-head .iv2-close svg {
    width: 18px; height: 18px; stroke: var(--iv2-charcoal);
    fill: none; stroke-width: 2.5; stroke-linecap: round;
  }
  .iv2-root .iv2-filter-panel-body { padding: 0 20px var(--iv2-s-4); flex: 1; }
  .iv2-root .iv2-filter-panel-footer {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--iv2-hairline);
    background: #fff;
    position: sticky; bottom: 0; z-index: 2;
  }
  .iv2-root .iv2-filter-panel-footer .iv2-clear {
    background: var(--iv2-surface); color: var(--iv2-charcoal);
    border: 1px solid var(--iv2-hairline);
    border-radius: var(--iv2-r-pill);
    font-weight: 600; font-size: 0.92em; height: 46px;
    cursor: pointer; font-family: inherit;
  }
  .iv2-root .iv2-filter-panel-footer .iv2-apply {
    background: var(--iv2-primary); color: #fff;
    border: none;
    border-radius: var(--iv2-r-pill);
    font-weight: 700; font-size: 0.95em; height: 46px;
    cursor: pointer; font-family: inherit;
  }
}

/* drawer-backdrop + sort-sheet(手機限定) */
.iv2-root .iv2-drawer-backdrop { display: none; }
.iv2-root .iv2-sort-sheet { display: none; }
@media (max-width: 900px) {
  .iv2-root .iv2-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
    display: block;
  }
  .iv2-root .iv2-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

  .iv2-root .iv2-sort-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
    z-index: 1001;
    padding-bottom: env(safe-area-inset-bottom);
    display: block;
  }
  .iv2-root .iv2-sort-sheet.is-open { transform: translateY(0); }
  .iv2-root .iv2-sort-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--iv2-hairline-soft);
  }
  .iv2-root .iv2-sort-sheet-head .iv2-title { font-size: 1em; font-weight: 700; color: var(--iv2-brand-navy); }
  .iv2-root .iv2-sort-sheet-head .iv2-close {
    width: 32px; height: 32px; display: grid; place-items: center;
    background: var(--iv2-surface);
    border: none; border-radius: 50%; cursor: pointer;
  }
  .iv2-root .iv2-sort-sheet-list { padding: 8px 0 12px; }
  .iv2-root .iv2-sort-sheet-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px;
    cursor: pointer; font-size: 0.98em;
    color: var(--iv2-charcoal);
  }
  .iv2-root .iv2-sort-sheet-item:hover { background: var(--iv2-surface-soft); }
  .iv2-root .iv2-sort-sheet-item.is-active { color: var(--iv2-primary); font-weight: 700; }
  .iv2-root .iv2-sort-sheet-item.is-active::after { content: "✓"; font-weight: 700; }

  /* 桌機 toolbar 右側下拉於手機隱藏(改用 sheet) */
  .iv2-root .iv2-toolbar-right { display: none !important; }
  .iv2-root .iv2-toolbar .iv2-result { font-size: 0.85em; }

  /* chip-row 手機可橫向滾 */
  .iv2-root .iv2-chip-row {
    flex-wrap: nowrap; overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .iv2-root .iv2-chip-row::-webkit-scrollbar { display: none; }
  .iv2-root .iv2-chip { flex-shrink: 0; }

  /* 浮動購物車手機:右下,稍小 */
  .iv2-root .iv2-float-cart { right: 16px; bottom: 20px; top: auto; width: 52px; height: 52px; }
  .iv2-root .iv2-float-cart svg { width: 22px; height: 22px; }
  .iv2-root .iv2-float-cart .iv2-tooltip { display: none; }
}

/* 購物 Q&A:在 page-head 麵包屑列右側,桌機 / 手機都置頂 */
.iv2-root .iv2-faq-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--iv2-primary-soft);
  color: var(--iv2-primary-deep);
  border-radius: var(--iv2-r-pill);
  font-weight: 600; font-size: 0.82em;
  border: 1px solid transparent;
  transition: background .15s, transform .15s, border-color .15s;
}
.iv2-root .iv2-faq-link:hover {
  background: #fff;
  border-color: var(--iv2-primary);
  color: var(--iv2-primary-deep);
  transform: translateY(-1px);
}
.iv2-root .iv2-faq-link svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.iv2-root .iv2-faq-link .iv2-arrow {
  font-size: 1em;
  transition: transform .15s;
}
.iv2-root .iv2-faq-link:hover .iv2-arrow { transform: translateX(3px); }

.iv2-root .iv2-filter-group {
  padding-block: var(--iv2-s-4);
  border-bottom: 1px solid var(--iv2-hairline-soft);
}
.iv2-root .iv2-filter-group:last-of-type { border-bottom: none; }
.iv2-root .iv2-filter-group:first-of-type { padding-top: 0; }
.iv2-root .iv2-filter-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--iv2-s-3);
  font-weight: 700; font-size: 0.95em;
  color: var(--iv2-brand-navy);
}
.iv2-root .iv2-filter-head .iv2-count { color: var(--iv2-muted); font-weight: 500; font-size: 0.85em; }
.iv2-root .iv2-filter-list { display: flex; flex-direction: column; gap: 4px; }
.iv2-root .iv2-filter-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.92em; cursor: pointer;
  color: var(--iv2-charcoal);
  padding: 7px 10px;
  margin: 0 -10px;
  border-radius: var(--iv2-r-sm);
  transition: background .12s;
}
.iv2-root .iv2-filter-item:hover { background: var(--iv2-surface-soft); }
.iv2-root .iv2-filter-item.is-active { background: var(--iv2-primary-soft); color: var(--iv2-primary-deep); font-weight: 600; }
.iv2-root .iv2-filter-item input { accent-color: var(--iv2-primary); width: 16px; height: 16px; cursor: pointer; }
.iv2-root .iv2-filter-item .iv2-n { margin-left: auto; color: var(--iv2-muted); font-size: 0.8em; }
.iv2-root .iv2-filter-clear {
  display: block; width: 100%;
  margin-top: var(--iv2-s-4);
  text-align: center;
  padding: 11px;
  background: var(--iv2-surface);
  border-radius: var(--iv2-r-pill);
  color: var(--iv2-charcoal);
  font-weight: 600; font-size: 0.9em;
  transition: background .12s;
  border: none; cursor: pointer; font-family: inherit;
}
.iv2-root .iv2-filter-clear:hover { background: var(--iv2-primary-soft); color: var(--iv2-primary-deep); }

/* ============ 右側主區 ============ */
.iv2-root .iv2-chip-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: var(--iv2-s-4);
}
.iv2-root .iv2-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: var(--iv2-r-pill);
  font-size: 0.85em; font-weight: 600;
  background: var(--iv2-primary); color: #fff;
  cursor: pointer;
  border: none; font-family: inherit;
}
.iv2-root .iv2-chip:hover { background: var(--iv2-primary-pressed); }
.iv2-root .iv2-chip .iv2-x { opacity: 0.7; }

.iv2-root .iv2-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--iv2-s-3);
  margin-bottom: var(--iv2-s-5);
  flex-wrap: wrap;
  padding-bottom: var(--iv2-s-4);
  border-bottom: 1px solid var(--iv2-hairline-soft);
}
.iv2-root .iv2-toolbar .iv2-result { font-size: 0.95em; color: var(--iv2-slate); }
.iv2-root .iv2-toolbar .iv2-result strong { color: var(--iv2-brand-navy); font-weight: 700; font-size: 1.1em; }
.iv2-root .iv2-toolbar-right { display: flex; gap: 10px; align-items: center; }
.iv2-root .iv2-toolbar-right .iv2-label { font-size: 0.85em; color: var(--iv2-slate); }
.iv2-root .iv2-sort-select {
  height: 38px; padding: 0 32px 0 14px;
  border-radius: var(--iv2-r-pill);
  border: 1px solid var(--iv2-hairline-strong);
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3e%3cpath fill='%235d5b54' d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") no-repeat right 12px center;
  font: inherit; font-size: 0.9em;
  cursor: pointer; appearance: none; -webkit-appearance: none;
}

/* ============ 商品卡 grid ============ */
.iv2-root .iv2-prod-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--iv2-s-5);
}
@media (max-width: 1100px) { .iv2-root .iv2-prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .iv2-root .iv2-prod-grid { grid-template-columns: 1fr; } }

.iv2-root .iv2-prod-card {
  background: #fff;
  border: 1px solid var(--iv2-hairline);
  border-radius: var(--iv2-r-md);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column;
  min-width: 0;
  color: inherit;
  /* v2.11: 靜止態加微陰影,卡片有浮起感(原僅邊框);hover 再升 lg */
  box-shadow: var(--iv2-shadow-sm);
}
.iv2-root .iv2-prod-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--iv2-shadow-lg);
  border-color: var(--iv2-primary);
}

.iv2-root .iv2-prod-cover {
  aspect-ratio: 16 / 10;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--iv2-primary), var(--iv2-brand-navy-mid));
}
.iv2-root .iv2-prod-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.iv2-root .iv2-prod-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}
.iv2-root .iv2-prod-cover .iv2-glyph {
  position: relative; z-index: 1;
  font-size: clamp(2rem, 1rem + 3vw, 2.6rem);
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  letter-spacing: -0.02em;
}
.iv2-root .iv2-prod-cover .iv2-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 12px;
  border-radius: var(--iv2-r-pill);
  font-size: 0.75em; font-weight: 700;
  backdrop-filter: blur(8px);
  z-index: 2;
}
.iv2-root .iv2-badge-hot { background: var(--iv2-accent-red); color: #fff; }
.iv2-root .iv2-badge-new { background: var(--iv2-success); color: #fff; }
.iv2-root .iv2-badge-sale { background: var(--iv2-accent-amber); color: var(--iv2-ink); }
.iv2-root .iv2-badge-soft { background: rgba(255,255,255,0.95); color: var(--iv2-ink); }
.iv2-root .iv2-badge-out { background: rgba(0,0,0,0.6); color: #fff; }

.iv2-root .iv2-prod-body {
  padding: var(--iv2-s-4) var(--iv2-s-5);
  display: flex; flex-direction: column;
  gap: 12px; flex: 1;
}
.iv2-root .iv2-prod-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.iv2-root .iv2-prod-meta .iv2-tag {
  font-size: 0.78em; font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--iv2-r-pill);
  background: var(--iv2-primary-soft); color: var(--iv2-primary-deep);
}
.iv2-root .iv2-prod-meta .iv2-tag-lesson {
  background: var(--iv2-surface-soft); color: var(--iv2-slate);
  border: 1px solid var(--iv2-hairline);
}
.iv2-root .iv2-prod-meta .iv2-tag-book {
  background: var(--iv2-tint-peach); color: #7a3f0e;
}
.iv2-root .iv2-prod-title {
  font-size: 1.05em; font-weight: 600;
  color: var(--iv2-brand-navy); line-height: 1.5;
  flex: 1;
  word-break: break-word; overflow-wrap: break-word;
}

.iv2-root .iv2-prod-price-row {
  display: flex; align-items: end; justify-content: space-between;
  gap: 8px; padding-top: 12px;
  border-top: 1px dashed var(--iv2-hairline-soft);
}
.iv2-root .iv2-prod-price .iv2-orig {
  font-size: 0.85em; color: var(--iv2-muted);
  text-decoration: line-through; display: block; line-height: 1.2;
}
.iv2-root .iv2-prod-price .iv2-now {
  font-size: 1.35em; font-weight: 700;
  color: var(--iv2-accent-red);
  display: block; line-height: 1.2;
}

.iv2-root .iv2-prod-cart-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 44px;
  border: none;
  border-radius: var(--iv2-r-pill);
  background: var(--iv2-primary); color: #fff;
  font-weight: 600; font-size: 0.92em;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.iv2-root .iv2-prod-cart-btn:hover { background: var(--iv2-primary-pressed); }
.iv2-root .iv2-prod-cart-btn svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.iv2-root .iv2-prod-cart-btn.is-added { background: var(--iv2-brand-navy); }
.iv2-root .iv2-prod-cart-btn.is-purchased { background: var(--iv2-success); }
.iv2-root .iv2-prod-cart-btn.is-disabled { background: var(--iv2-muted); cursor: not-allowed; }

/* ============ pager / load more ============ */
.iv2-root .iv2-news-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: var(--iv2-s-7); flex-wrap: wrap; }
.iv2-root .iv2-pg-btn { min-width: 40px; height: 40px; padding: 0 8px; border-radius: var(--iv2-r-sm); border: 1px solid var(--iv2-hairline); background: var(--iv2-canvas); color: var(--iv2-charcoal); font-weight: 600; font-size: 0.9em; font-variant-numeric: tabular-nums; transition: all .15s ease; font-family: inherit; cursor: pointer; }
.iv2-root .iv2-pg-btn:hover:not(:disabled):not(.is-active) { border-color: var(--iv2-primary); color: var(--iv2-primary); }
.iv2-root .iv2-pg-btn.is-active { background: var(--iv2-primary); border-color: var(--iv2-primary); color: #fff; }
.iv2-root .iv2-pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.iv2-root .iv2-pg-ellipsis { color: var(--iv2-muted); padding: 0 4px; }
@media (max-width: 560px) { .iv2-root .iv2-pg-btn { min-width: 36px; height: 36px; font-size: 0.85em; } }

/* 空狀態 */
.iv2-root .iv2-empty {
  grid-column: 1 / -1;
  padding: var(--iv2-s-8) var(--iv2-s-5);
  text-align: center;
  color: var(--iv2-slate);
  background: var(--iv2-surface-soft);
  border-radius: var(--iv2-r-md);
  border: 1px dashed var(--iv2-hairline);
}
.iv2-root .iv2-empty .iv2-empty-icon {
  font-size: 2.5em; margin-bottom: 12px; color: var(--iv2-muted);
}
.iv2-root .iv2-empty .iv2-empty-title {
  font-size: 1.1em; font-weight: 700;
  color: var(--iv2-charcoal); margin-bottom: 6px;
}

/* ============ 浮動購物車(圓形 icon-only) ============ */
.iv2-root .iv2-float-cart {
  position: fixed; right: 20px; top: 200px; z-index: 100;
  width: 58px; height: 58px;
  background: var(--iv2-accent-red); color: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255,56,92,0.4);
  display: grid; place-items: center;
  transition: transform .15s, box-shadow .15s;
}
.iv2-root .iv2-float-cart:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(255,56,92,0.5);
}
.iv2-root .iv2-float-cart svg {
  width: 24px; height: 24px;
  stroke: #fff; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.iv2-root .iv2-float-cart .iv2-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--iv2-brand-navy); color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 0.7em; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.iv2-root .iv2-float-cart .iv2-tooltip {
  position: absolute; right: 100%; top: 50%;
  transform: translateY(-50%);
  margin-right: 12px;
  background: var(--iv2-brand-navy); color: #fff;
  padding: 8px 14px;
  border-radius: var(--iv2-r-pill);
  font-size: 0.78em; font-weight: 600;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.iv2-root .iv2-float-cart .iv2-tooltip::after {
  content: ""; position: absolute;
  left: 100%; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--iv2-brand-navy);
}
.iv2-root .iv2-float-cart:hover .iv2-tooltip {
  opacity: 1; transform: translateY(-50%) translateX(-4px);
}
