﻿/* ============================================================
   feature-v2.css — 課程詳情 feature.aspx 新版套版專用
   - 對應 demo\feature_demo.html(2026-05-19)
   - 全部 class 加 iv2- 前綴,scope 在 .iv2-root 內
   - 不動 reset / 全域 typography / Bootstrap .container .row .modal,避免汙染既有 myModal 機制說明彈窗
   ============================================================ */

.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-shadow-xl: 0 24px 60px rgba(15,23,48,0.18);
  --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;
}

/* feature.aspx 本頁:body / nav / footer 一併套字體(同 plan-v2 規則) */
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;
}

/* 防止頁面橫向溢出(2026-05-19 fix:feature.aspx 含 700+ 行 myModal markup,
   即使 display:none 也可能因內部元素撐寬,鎖死 html/body overflow-x) */
html, body { overflow-x: hidden; max-width: 100vw; }
.iv2-root { max-width: 100%; overflow-x: hidden; }
#myModal, #myModal * { max-width: 100%; box-sizing: border-box; }

.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; }

/* 容器 */
/* 寬度占比:電腦 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-h2 { font-size: clamp(22px, 14px + 1.2vw, 28px); font-weight: 700; line-height: 1.3; color: var(--iv2-ink); margin: 0; }
.iv2-root .iv2-lead { font-size: 1.05em; line-height: 1.65; color: var(--iv2-slate); }
@media (max-width: 600px) {
  .iv2-root { font-size: 16px; }
  .iv2-root .iv2-lead { font-size: 1em; }
}

/* 按鈕 */
.iv2-root .iv2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px;
  border-radius: var(--iv2-r-pill);
  font-weight: 600; font-size: 0.95em;
  transition: all .15s;
  white-space: nowrap; border: none;
  cursor: pointer; font-family: inherit;
}
.iv2-root .iv2-btn-primary { background: var(--iv2-primary); color: #fff; }
.iv2-root .iv2-btn-primary:hover { background: var(--iv2-primary-pressed); color: #fff; }
.iv2-root .iv2-btn-ghost { background: var(--iv2-surface); color: var(--iv2-charcoal); border: 1px solid var(--iv2-hairline); }
.iv2-root .iv2-btn-ghost:hover { background: var(--iv2-surface-soft); border-color: var(--iv2-primary); color: var(--iv2-primary); }
.iv2-root .iv2-btn-lg { height: 56px; padding: 0 28px; font-size: 1.05em; }
.iv2-root .iv2-btn-block { width: 100%; }
.iv2-root .iv2-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ============ page-utility:麵包屑 + Q&A(沿用 plan-v2 慣例)============ */
.iv2-root .iv2-page-utility-row {
  background: var(--iv2-surface);
  border-bottom: 1px solid var(--iv2-hairline);
  padding-block: 14px;
}
.iv2-root .iv2-page-utility {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.iv2-root .iv2-crumb { font-size: 0.85em; color: var(--iv2-slate); line-height: 1.6; word-break: break-word; }
.iv2-root .iv2-crumb a:hover { color: var(--iv2-primary); }
.iv2-root .iv2-crumb .sep { margin: 0 8px; color: var(--iv2-muted); }
.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); }

/* ============ Hero:左大圖 / 右 buy-panel ============ */
.iv2-root .iv2-detail-hero { padding-block: var(--iv2-s-6) var(--iv2-s-7); }
.iv2-root .iv2-detail-hero-grid {
  display: grid; grid-template-columns: 1fr 380px;
  gap: var(--iv2-s-7);
  align-items: start;
}
@media (max-width: 980px) {
  .iv2-root .iv2-detail-hero { padding-block: var(--iv2-s-5) var(--iv2-s-6); }
  .iv2-root .iv2-detail-hero-grid { grid-template-columns: 1fr; gap: var(--iv2-s-5); }
}

.iv2-root .iv2-hero-cover {
  /* 取消固定 aspect-ratio,讓 img 用自然高度完整顯示(2026-05-19 調整) */
  border-radius: var(--iv2-r-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--iv2-primary), var(--iv2-brand-navy-mid));
  position: relative;
  box-shadow: var(--iv2-shadow-xl);
  min-height: 200px;  /* 無 img 時,glyph fallback 仍能撐高度 */
}
.iv2-root .iv2-hero-cover img {
  display: block;
  width: 100%;
  height: auto;  /* 圖片完整顯示,跟著比例自然加高 */
  position: relative;
  z-index: 1;
}
.iv2-root .iv2-hero-cover .iv2-cover-glyph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.92);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.02em;
  z-index: 1;
}
.iv2-root .iv2-hero-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 600px) { .iv2-root .iv2-hero-cover { border-radius: var(--iv2-r-md); } }

.iv2-root .iv2-detail-head { margin-top: var(--iv2-s-5); }
.iv2-root .iv2-detail-head .iv2-meta-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--iv2-s-3); }
.iv2-root .iv2-detail-head .iv2-tag {
  font-size: 0.78em; font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--iv2-r-pill);
  background: var(--iv2-primary-soft); color: var(--iv2-primary-deep);
}
.iv2-root .iv2-detail-head .iv2-tag-book { background: var(--iv2-tint-peach); color: #7a3f0e; }
.iv2-root .iv2-detail-head h1 {
  font-size: clamp(20px, 14px + 1.2vw, 28px);  /* 縮小一級(2026-05-19 調整) */
  font-weight: 700; line-height: 1.3;
  color: var(--iv2-ink);
  word-break: break-word;
}

/* hero-infos:對應舊版 <p id="plan_infos">
   2026-05-20 v2:加厚頂部漸層條 + 右上角圓形淡紫裝飾 + 卡片本體微漸層 */
.iv2-root .iv2-hero-infos {
  position: relative;
  isolation: isolate;
  margin-top: var(--iv2-s-4);
  padding: calc(var(--iv2-s-5) + 4px) var(--iv2-s-5) var(--iv2-s-5);
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 55%, rgba(236, 233, 251, 0.55) 100%);
  border: 1px solid var(--iv2-hairline);
  border-radius: var(--iv2-r-md);
  box-shadow: var(--iv2-shadow-sm);
  font-size: 0.96em;
  overflow: hidden;
}
.iv2-root .iv2-hero-infos::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, var(--iv2-primary-deep) 0%, var(--iv2-primary) 100%);
  z-index: 1;
}
.iv2-root .iv2-hero-infos::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--iv2-primary-soft) 0%, rgba(236, 233, 251, 0.45) 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.iv2-root .iv2-hero-infos > * { position: relative; z-index: 2; }
.iv2-root .iv2-hero-infos h2,
.iv2-root .iv2-hero-infos h3 { margin-top: var(--iv2-s-3); }
.iv2-root .iv2-hero-infos p:last-child { margin-bottom: 0; }
.iv2-root .iv2-hero-infos .iv2-mechanism-btn { margin-block: var(--iv2-s-2); }
@media (max-width: 600px) {
  .iv2-root .iv2-hero-infos {
    padding: calc(18px + 4px) 16px 18px;
    font-size: 0.94em;
    border-radius: var(--iv2-r-sm);
  }
  .iv2-root .iv2-hero-infos::after { width: 120px; height: 120px; top: -40px; right: -40px; }
}

/* buy-panel(2026-05-20:加高 + 放大文字 1.15x,與商品縮圖比例呼應) */
.iv2-root .iv2-buy-panel {
  background: var(--iv2-canvas);
  border: 1px solid var(--iv2-hairline);
  border-radius: var(--iv2-r-md);
  padding: 36px 28px 32px;
  box-shadow: var(--iv2-shadow-md);
  position: sticky; top: 90px;
}
.iv2-root .iv2-buy-panel .iv2-price-row { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; }
.iv2-root .iv2-buy-panel .iv2-price-now {
  font-size: 3.2rem; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--iv2-accent-red); line-height: 1;
}
.iv2-root .iv2-buy-panel .iv2-price-was {
  font-size: 1.15em; color: var(--iv2-muted);
  text-decoration: line-through;
}
.iv2-root .iv2-buy-panel .iv2-price-unit { font-size: 0.55em; color: var(--iv2-slate); margin-left: 4px; }
.iv2-root .iv2-buy-panel .iv2-actions { display: flex; flex-direction: column; gap: 10px; margin-top: var(--iv2-s-6); }
.iv2-root .iv2-buy-panel .iv2-perks {
  margin-top: var(--iv2-s-6);
  padding-top: var(--iv2-s-5);
  border-top: 1px solid var(--iv2-hairline-soft);
}
.iv2-root .iv2-buy-panel .iv2-perk {
  display: flex; gap: 12px;
  padding: 10px 0;
  font-size: 1.05em; color: var(--iv2-charcoal);
  align-items: flex-start; line-height: 1.6;
}
.iv2-root .iv2-buy-panel .iv2-perk svg { color: var(--iv2-success); margin-top: 4px; flex-shrink: 0; width: 20px; height: 20px; }
@media (max-width: 980px) {
  .iv2-root .iv2-buy-panel { position: static; padding: 24px 20px; }
  .iv2-root .iv2-buy-panel .iv2-price-now { font-size: 2.4rem; }
  .iv2-root .iv2-buy-panel .iv2-perk { font-size: 1em; padding: 8px 0; }
}

/* buyCourse 按鈕 4 種態 */
.iv2-root .iv2-buy-panel .iv2-buy-btn { width: 100%; }
.iv2-root .iv2-buy-panel .iv2-buy-btn.is-added { background: var(--iv2-brand-navy); color: #fff; }
.iv2-root .iv2-buy-panel .iv2-buy-btn.is-added:hover { background: var(--iv2-brand-navy-mid); }
.iv2-root .iv2-buy-panel .iv2-buy-btn.is-purchased { background: var(--iv2-success); color: #fff; }
.iv2-root .iv2-buy-panel .iv2-buy-btn.is-purchased:hover { background: #168f30; }
.iv2-root .iv2-buy-panel .iv2-buy-btn.is-disabled { background: var(--iv2-muted); color: #fff; cursor: not-allowed; pointer-events: none; opacity: 0.7; }

/* ============ 通用 section ============ */
.iv2-root .iv2-section { padding-block: var(--iv2-s-8); border-top: 1px solid var(--iv2-hairline-soft); }
.iv2-root .iv2-section-soft { background: var(--iv2-surface-soft); }
.iv2-root .iv2-section-head { margin-bottom: var(--iv2-s-5); }
.iv2-root .iv2-section-head .iv2-h2 { margin-top: 8px; }
.iv2-root .iv2-section-head .iv2-lead { margin-top: 10px; max-width: 720px; }
@media (max-width: 600px) { .iv2-root .iv2-section { padding-block: var(--iv2-s-7); } }

/* 富文本 content(用於 plan_infos / contents / teacher_infos)*/
.iv2-root .iv2-rich-content { line-height: 1.8; color: var(--iv2-charcoal); }
.iv2-root .iv2-rich-content h2,
.iv2-root .iv2-rich-content h3 {
  color: var(--iv2-brand-navy);
  margin-top: var(--iv2-s-5);
  margin-bottom: var(--iv2-s-3);
  font-weight: 700;
}
.iv2-root .iv2-rich-content h3 { font-size: 1.15em; }
.iv2-root .iv2-rich-content p { margin-bottom: var(--iv2-s-3); }
.iv2-root .iv2-rich-content ul,
.iv2-root .iv2-rich-content ol { padding-left: 1.5em; margin-bottom: var(--iv2-s-3); }
.iv2-root .iv2-rich-content li { margin-bottom: 6px; line-height: 1.7; }
.iv2-root .iv2-rich-content strong { color: var(--iv2-ink); }
.iv2-root .iv2-rich-content table {
  border-collapse: collapse; width: 100%;
  margin-block: var(--iv2-s-3); font-size: 0.95em;
}
.iv2-root .iv2-rich-content table th,
.iv2-root .iv2-rich-content table td { padding: 10px 14px; border: 1px solid var(--iv2-hairline); }
.iv2-root .iv2-rich-content table th { background: var(--iv2-surface); font-weight: 700; }
.iv2-root .iv2-rich-content table tr:nth-child(even) td { background: var(--iv2-surface-soft); }
.iv2-root .iv2-rich-content img {
  max-width: 100%; height: auto;
  border-radius: var(--iv2-r-sm);
  margin-block: var(--iv2-s-3);
}
.iv2-root .iv2-rich-content blockquote {
  border-left: 4px solid var(--iv2-primary);
  padding: 10px 18px;
  background: var(--iv2-primary-soft);
  color: var(--iv2-charcoal);
  margin: var(--iv2-s-3) 0;
  border-radius: 0 var(--iv2-r-sm) var(--iv2-r-sm) 0;
}
@media (max-width: 600px) {
  .iv2-root .iv2-rich-content { line-height: 1.75; font-size: 0.96em; }
  .iv2-root .iv2-rich-content table {
    font-size: 0.85em; display: block; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 機制說明按鈕(plan_infos 內由 feature.js 動態生成) */
.iv2-root .iv2-mechanism-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--iv2-primary); color: #fff;
  border-radius: var(--iv2-r-pill);
  font-weight: 600; font-size: 0.92em;
  margin-block: var(--iv2-s-3);
  cursor: pointer; transition: background .15s;
  border: none;
}
.iv2-root .iv2-mechanism-btn:hover { background: var(--iv2-primary-pressed); color: #fff; }
.iv2-root .iv2-mechanism-btn::before { content: "ℹ"; font-size: 1.1em; }

/* ============ 課程架構 ============ */
.iv2-root .iv2-struct-shell {
  background: var(--iv2-canvas);
  border: 1px solid var(--iv2-hairline);
  border-radius: var(--iv2-r-md);
  padding: var(--iv2-s-5);
}
.iv2-root .iv2-struct-note { font-size: 0.85em; color: var(--iv2-slate); margin-top: 10px; }
@media (max-width: 600px) { .iv2-root .iv2-struct-shell { padding: var(--iv2-s-4); } }

/* ============ 試聽影片 grid ============ */
.iv2-root .iv2-trial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--iv2-s-5);
}
@media (max-width: 900px) { .iv2-root .iv2-trial-grid { grid-template-columns: repeat(2, 1fr); gap: var(--iv2-s-4); } }
@media (max-width: 600px) { .iv2-root .iv2-trial-grid { grid-template-columns: 1fr; } }

.iv2-root .iv2-trial-card {
  background: var(--iv2-canvas);
  border: 1px solid var(--iv2-hairline);
  border-radius: var(--iv2-r-md);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
  /* v2.11: 靜止態加微陰影,卡片有浮起感(原僅邊框);hover 再升 lg */
  box-shadow: var(--iv2-shadow-sm);
}
.iv2-root .iv2-trial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--iv2-shadow-lg);
  border-color: var(--iv2-primary);
}
.iv2-root .iv2-trial-cover {
  aspect-ratio: 16 / 9;
  position: relative;
  background: linear-gradient(135deg, var(--iv2-brand-navy-mid), var(--iv2-primary));
  overflow: hidden;
}
.iv2-root .iv2-trial-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.iv2-root .iv2-play-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.25);
  transition: background .15s;
  z-index: 1;
}
.iv2-root .iv2-trial-card:hover .iv2-play-overlay { background: rgba(0,0,0,0.45); }
.iv2-root .iv2-play-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--iv2-primary-deep);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.iv2-root .iv2-play-btn svg { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.iv2-root .iv2-trial-body { padding: var(--iv2-s-4); }
.iv2-root .iv2-trial-body h4 {
  font-size: 0.98em; font-weight: 600;
  color: var(--iv2-brand-navy);
  line-height: 1.5; word-break: break-word;
}
.iv2-root .iv2-trial-meta { font-size: 0.78em; color: var(--iv2-slate); margin-top: 6px; }

/* lightbox(點試聽彈出 YouTube embed) */
.iv2-root .iv2-lightbox-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.iv2-root .iv2-lightbox-mask.is-open { display: flex; }
.iv2-root .iv2-lightbox-frame {
  width: min(960px, 95vw);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--iv2-r-md);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.iv2-root .iv2-lightbox-frame iframe { width: 100%; height: 100%; border: 0; }
.iv2-root .iv2-lightbox-close {
  position: absolute; top: -48px; right: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9); color: var(--iv2-ink);
  display: grid; place-items: center;
  border: none; cursor: pointer;
  font-size: 20px; font-weight: 700;
}
@media (max-width: 600px) {
  .iv2-root .iv2-lightbox-mask { padding: 12px; }
  .iv2-root .iv2-lightbox-close { top: -44px; }
}

/* ============ 老師區塊 ============ */
.iv2-root .iv2-teacher-shell {
  background: var(--iv2-canvas);
  border: 1px solid var(--iv2-hairline);
  border-radius: var(--iv2-r-md);
  padding: var(--iv2-s-6);
}
@media (max-width: 600px) { .iv2-root .iv2-teacher-shell { padding: var(--iv2-s-4); } }

/* ============ 浮動購物車 + 手機底部固定 buy-bar ============ */
.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:hover .iv2-tooltip {
  opacity: 1; transform: translateY(-50%) translateX(-4px);
}
@media (max-width: 980px) {
  .iv2-root .iv2-float-cart { right: 16px; top: auto; bottom: 88px; width: 52px; height: 52px; }
  .iv2-root .iv2-float-cart svg { width: 22px; height: 22px; }
  .iv2-root .iv2-float-cart .iv2-tooltip { display: none; }
}

/* ============ 懸浮 buy-strip(< 980px 顯示;只含價格 + 加入購物車,無標題)============ */
.iv2-root .iv2-buy-fixed {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--iv2-hairline);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 90;
  display: none; align-items: center; justify-content: space-between;
  gap: 12px;
  transform: translateY(100%);
  transition: transform .25s ease;
}
.iv2-root .iv2-buy-fixed.is-visible { transform: translateY(0); }
.iv2-root .iv2-buy-fixed .iv2-bf-prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.iv2-root .iv2-buy-fixed .iv2-bf-now { font-weight: 700; font-size: 1.25em; color: var(--iv2-accent-red); line-height: 1; }
.iv2-root .iv2-buy-fixed .iv2-bf-was { color: var(--iv2-muted); text-decoration: line-through; font-size: 0.85em; }
.iv2-root .iv2-buy-fixed .iv2-bf-actions { flex-shrink: 0; }
.iv2-root .iv2-buy-fixed .iv2-bf-actions .iv2-btn { height: 44px; padding: 0 22px; font-size: 0.95em; }

/* buy-strip 內按鈕 4 種態(同 .iv2-buy-btn)*/
.iv2-root .iv2-buy-fixed .iv2-btn.is-added { background: var(--iv2-brand-navy); color: #fff; }
.iv2-root .iv2-buy-fixed .iv2-btn.is-purchased { background: var(--iv2-success); color: #fff; }
.iv2-root .iv2-buy-fixed .iv2-btn.is-disabled { background: var(--iv2-muted); color: #fff; pointer-events: none; opacity: 0.7; }

@media (max-width: 980px) {
  .iv2-root .iv2-buy-fixed { display: flex; }
  body { padding-bottom: 72px; }  /* 預留底部 strip 空間,避免遮住內容 */
}

/* ============ myModal 機制說明彈窗 — 響應式覆寫(2026-05-19 補) ============
   原 feature.aspx head 區段有完整響應式 modal CSS,改寫時被移除,造成手機版彈窗超出頁面。
   這裡只覆寫 modal-dialog / modal-body 的尺寸,不動內部已有的字色 / 排版樣式。 */
#myModal .modal-dialog {
  margin: 30px auto;
  max-width: 70%;
  width: auto;
}
#myModal .modal-body {
  max-height: 60vh;
  overflow-y: auto;
}
@media (min-width: 769px) and (max-width: 1024px) {
  #myModal .modal-dialog { max-width: 80%; }
}
@media (min-width: 481px) and (max-width: 768px) {
  #myModal .modal-dialog { max-width: 90%; margin: 20px auto; }
  #myModal .modal-body { max-height: 65vh; padding: 16px; }
}
@media (max-width: 480px) {
  #myModal .modal-dialog {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    margin: 10px auto !important;
  }
  #myModal .modal-body { max-height: 70vh; padding: 14px; font-size: 14px; }
  #myModal .modal-title { font-size: 20px !important; line-height: 1.4; }
}
