+
diff --git a/src/components/detail/detail-hero.tsx b/src/components/detail/detail-hero.tsx
index 2a3eb6e..7491276 100644
--- a/src/components/detail/detail-hero.tsx
+++ b/src/components/detail/detail-hero.tsx
@@ -32,7 +32,7 @@ export function DetailHero({
const bgClass = isBrand
? 'bg-brand-section text-white'
- : 'bg-white text-ink';
+ : 'bg-bg-primary text-ink';
return (
diff --git a/src/components/detail/detail.test.tsx b/src/components/detail/detail.test.tsx
index 8aedbfa..4e771fa 100644
--- a/src/components/detail/detail.test.tsx
+++ b/src/components/detail/detail.test.tsx
@@ -383,6 +383,21 @@ describe('DetailHero', () => {
const section = container.querySelector('section');
expect(section).toBeInTheDocument();
});
+
+ it('should use theme-aware bg token (not hard-coded bg-white) for light variant', async () => {
+ const { DetailHero } = await import('./detail-hero');
+ const { container } = render(
+
+ );
+ // 暗黑模式:浅色底色必须走 CSS 变量 token,dark 下才能随主题反色
+ const section = container.querySelector('section');
+ expect(section?.className).toContain('bg-bg-primary');
+ expect(section?.className).not.toContain('bg-white');
+ });
});
describe('ProductValueSection', () => {