/* ============================================================
   XIN · 内页样式（大自然能量亮色主题）
   ============================================================ */

.page { padding-top: 120px; min-height: 100vh; }
.page-head { text-align: center; margin-bottom: 48px; }
.page-head .eyebrow { font-size: 0.8rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; font-weight: 500; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-head p { color: var(--text-muted); margin-top: 14px; }
.breadcrumb { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- 购物车徽标 ---------- */
.cart-badge { position: relative; }
.cart-badge span { position: absolute; top: -8px; right: -10px; background: var(--energy); color: #fff; font-size: 0.68rem; min-width: 18px; height: 18px; border-radius: 100px; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 2px 8px rgba(217,131,91,0.4); }

/* ---------- 过滤条 ---------- */
.filters { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.chip { padding: 8px 20px; border-radius: 100px; font-size: 0.85rem; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-muted); box-shadow: 0 3px 10px rgba(120,95,65,0.05); transition: all 0.3s var(--ease); }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--energy); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(217,131,91,0.3); }

/* ============================================================
   课程详情
   ============================================================ */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 44px; align-items: start; }
.detail-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: linear-gradient(160deg, #eef1f0, #dde3e2); border: 1px solid var(--line); position: relative; box-shadow: var(--shadow); }
.detail-media::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.45), transparent 70%); }
.detail-media:has(img)::after { display: none; }
.detail-media.ink-media img { filter: grayscale(1) contrast(1.16) brightness(1.06); }

/* 产品相册缩略图 */
.thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.thumbs .thumb { width: 68px; height: 68px; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: var(--nature); transition: border-color 0.25s; }
.thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .thumb.active { border-color: var(--accent); }
.detail-title { font-size: clamp(2rem, 4vw, 3rem); margin: 18px 0 12px; }
.detail-meta { display: flex; gap: 18px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.detail-meta .card-tag { color: var(--accent); }

/* 购买侧栏 */
.buy-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); position: sticky; top: 100px; overflow: hidden; }
.buy-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--nature); }
.buy-card .price { font-size: 2.2rem; display: block; margin-bottom: 6px; }
.buy-card .btn { width: 100%; margin-top: 16px; }
.buy-card ul { list-style: none; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.buy-card li { color: var(--text-muted); font-size: 0.9rem; padding: 7px 0; display: flex; gap: 10px; align-items: center; }
.buy-card li::before { content: '❋'; color: var(--leaf); }

/* 章节手风琴 */
.chapters { margin-top: 56px; }
.chapters h2 { font-size: 1.8rem; margin-bottom: 24px; }
.chapter { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; background: var(--surface); box-shadow: 0 6px 18px rgba(120,95,65,0.05); }
.chapter-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; user-select: none; }
.chapter-head h3 { font-size: 1.15rem; }
.chapter-head .meta { color: var(--text-dim); font-size: 0.82rem; }
.chapter-body { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.chapter.open .chapter-body { max-height: 600px; }
.lesson-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.lesson-row .l { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }
.lesson-row a:hover { color: var(--accent); }
.lesson-row .icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-tint); font-size: 0.8rem; color: var(--text-muted); }
.lesson-row.done .icon { background: var(--success); color: #fff; }
.lesson-row .free { color: var(--accent); font-size: 0.75rem; border: 1px solid var(--accent); padding: 2px 10px; border-radius: 100px; }
.lesson-row .dur { color: var(--text-dim); font-size: 0.82rem; }

/* ============================================================
   播放页
   ============================================================ */
.player-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding-top: 100px; min-height: 100vh; max-width: var(--maxw); margin: 0 auto; }
.player-main { min-width: 0; }
.video-frame { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #2e2823; border: 1px solid var(--line); display: grid; place-items: center; position: relative; box-shadow: var(--shadow-lg); }
.video-frame video { width: 100%; height: 100%; }
.video-placeholder { text-align: center; color: rgba(255,255,255,0.85); padding: 40px; }
.video-placeholder .orb { width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #f2cba6, var(--leaf) 42%, var(--teal) 78%, var(--sky)); box-shadow: 0 0 40px rgba(217,131,91,0.6); animation: breathe 2.6s ease-in-out infinite; }
.player-title { font-size: 1.6rem; margin: 20px 0 8px; }
.player-sub { color: var(--text-muted); font-size: 0.9rem; }

.playlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden auto; max-height: calc(100vh - 130px); box-shadow: var(--shadow); }
.playlist-head { padding: 20px; border-bottom: 1px solid var(--line); }
.playlist-head h3 { font-size: 1.1rem; }
.playlist-head .prog-label { font-size: 0.8rem; color: var(--text-muted); margin: 10px 0 8px; display: flex; justify-content: space-between; }
.pl-chapter-title { padding: 14px 20px 6px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.pl-lesson { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; transition: background 0.25s; font-size: 0.9rem; }
.pl-lesson:hover { background: var(--surface-2); }
.pl-lesson.active { background: linear-gradient(90deg, rgba(217,131,91,0.12), transparent); border-left: 3px solid var(--accent); }
.pl-lesson .icon { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-tint); font-size: 0.75rem; color: var(--text-muted); }
.pl-lesson.done .icon { background: var(--success); color: #fff; }
.pl-lesson .t { flex: 1; color: var(--text-muted); }
.pl-lesson.active .t { color: var(--text); font-weight: 500; }
.pl-lesson .dur { color: var(--text-dim); font-size: 0.78rem; }

/* ============================================================
   产品详情（新中式轻奢）
   ============================================================ */
.pd-cat { display: inline-flex; align-items: center; gap: 9px; font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.pd-cat .seal-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--red-grad); box-shadow: 0 0 8px rgba(178,58,46,0.4); }
.pd-title { font-size: clamp(2rem, 3.6vw, 2.9rem); margin: 16px 0 10px; letter-spacing: 0.08em; color: var(--ink); }
.pd-rule { width: 46px; height: 2px; background: var(--red-grad); margin: 4px 0 20px; border-radius: 2px; }
.pd-price { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--red); margin-bottom: 20px; }
.pd-desc { color: var(--text-muted); line-height: 2.05; margin-bottom: 6px; }
.pd-assure { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.04em; }
.pd-assure span { display: inline-flex; align-items: center; gap: 8px; }
.pd-assure i { color: var(--gold-deep); font-style: normal; }

.variant-group { margin: 22px 0; }
.variant-group .label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.variant-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.variant-opt { padding: 10px 20px; border-radius: 100px; font-size: 0.88rem; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); transition: all 0.25s var(--ease); }
.variant-opt:hover { border-color: var(--accent); }
.variant-opt.selected { background: var(--energy); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(217,131,91,0.3); }
.variant-opt.disabled { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }
.stock-note { font-size: 0.85rem; color: var(--text-muted); margin: 8px 0 20px; }
.stock-note.out { color: var(--danger); }
.qty-row { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 100px; overflow: hidden; background: var(--surface); }
.qty-ctrl button { background: none; border: none; color: var(--text); width: 40px; height: 40px; font-size: 1.1rem; }
.qty-ctrl button:hover { background: var(--surface-2); }
.qty-ctrl span { width: 44px; text-align: center; }

/* ============================================================
   表单
   ============================================================ */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.auth-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--nature); }
.auth-card h1 { font-size: 2rem; text-align: center; margin-bottom: 8px; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.field input { width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); background: var(--bg-tint); border: 1px solid var(--line); color: var(--text); font-size: 0.95rem; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; }
.field input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,131,91,0.14); }
.auth-card .btn { width: 100%; margin-top: 8px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--text-muted); font-size: 0.9rem; }
.auth-alt a { color: var(--accent); }

/* ============================================================
   购物车
   ============================================================ */
.cart-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item .thumb { width: 90px; height: 90px; border-radius: var(--radius-sm); background: var(--nature); }
.cart-item .info h4 { font-family: var(--font-sans); font-size: 1rem; margin-bottom: 4px; }
.cart-item .info .var { color: var(--text-dim); font-size: 0.82rem; }
.cart-item .info .rm { color: var(--text-dim); font-size: 0.8rem; margin-top: 8px; }
.cart-item .info .rm:hover { color: var(--danger); }
.cart-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: sticky; top: 100px; box-shadow: var(--shadow); overflow: hidden; }
.cart-summary::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--nature); }
.cart-summary .row { display: flex; justify-content: space-between; padding: 10px 0; color: var(--text-muted); }
.cart-summary .row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 18px; color: var(--text); font-size: 1.2rem; }
.cart-summary .row.total b { color: transparent; background: var(--energy); -webkit-background-clip: text; background-clip: text; font-family: var(--font-serif); font-size: 1.6rem; }
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state .orb { width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #f2cba6, var(--leaf) 42%, var(--teal) 78%, var(--sky)); box-shadow: 0 0 40px rgba(217,131,91,0.4); opacity: 0.9; }

/* ============================================================
   我的课程
   ============================================================ */
.dash-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 44px; }
.dash-avatar { width: 66px; height: 66px; border-radius: 50%; background: var(--energy); box-shadow: var(--glow); display: grid; place-items: center; font-size: 1.5rem; font-family: var(--font-serif); color: #fff; }
.dash-hero h1 { font-size: 2rem; }
.dash-hero p { color: var(--text-muted); }
.ratio-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); margin: 14px 0 8px; }

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .player-layout { grid-template-columns: 1fr; padding-left: 24px; padding-right: 24px; }
  .playlist { max-height: none; }
  .buy-card, .cart-summary { position: static; }
}
