/* ============================================
   Configurator 4 主样式文件 - 模块化架构
   ============================================ */

/* ========== 1. CSS 变量定义 ========== */
@import './configurator-4-variables.css';

/* ========== 2. 基础样式模块 ========== */
@import './base/layout.css';
@import './base/loading.css';
@import './base/header.css';
@import './base/product-info.css';
@import './base/vehicle-specs.css';
@import './base/configurator-panel.css';
@import './base/options.css';
@import './base/colors.css';
@import './base/wheels-interiors.css';
@import './base/carousel.css';
@import './base/summary.css';
@import './base/buttons.css';

/* ========== 3. 移动端样式模块 ========== */
@import './mobile/tablet.css';
@import './mobile/mobile-layout.css';
@import './mobile/mobile-cards.css';
@import './mobile/mobile-info-panel.css';
@import './mobile/mobile-navigation.css';
@import './mobile/mobile-carousel.css';
@import './mobile/mobile-summary.css';
@import './mobile/desktop-restore.css';

/* ========== 4. 鸿蒙字体定义 ========== */
/* 
   注意：
   如果当前 CSS 文件路径是 public/frontend/css/configurator-4.css，
   字体文件路径是 public/frontend/fonts/，
   那么这里用 ../fonts/ 是正确的。
*/

@font-face {
    font-family: 'HarmonyOS_Sans_SC';
    src: url('../fonts/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS_Sans_SC';
    src: url('../fonts/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS_Sans_SC';
    src: url('../fonts/HarmonyOS_Sans_SC_Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS_Sans_SC';
    src: url('../fonts/HarmonyOS_Sans_SC_Bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* 兼容原来代码里 font-weight: 900 的情况 */
@font-face {
    font-family: 'HarmonyOS_Sans_SC';
    src: url('../fonts/HarmonyOS_Sans_SC_Bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ========== 5. 高优先级覆盖规则 ========== */
/* 移动端信息面板显示控制（最高优先级） */
@media (min-width: 769px) {
    .c4-mobile-info-panel {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .c4-mobile-info-panel {
        display: block !important;
    }
}

/* ========== 6. 强制字体覆盖规则（确保优先级最高） ========== */
.c4-main-container *,
.c4-main-content *,
.c4-product-info-container,
.c4-product-info-container *,
.c4-product-info-container * *,
.c4-product-info-container * * *,
.c4-configurator-panel,
.c4-configurator-panel *,
.c4-configurator-panel * * {
    font-family: 'HarmonyOS_Sans_SC', sans-serif !important;
}

/* 电池信息字体规则（独立定义，优先级最高） */
/* 注意：字重由 vehicle-specs.css 控制，这里只确保字体正确 */
.c4-vehicle-specs .c4-spec-label,
.c4-vehicle-specs .c4-spec-label * {
    font-family: 'HarmonyOS_Sans_SC', sans-serif !important;
}

/* 数值和单位：只设置字体，字重由 vehicle-specs.css 控制 */
.c4-vehicle-specs .c4-spec-value,
.c4-vehicle-specs .c4-spec-value *,
.c4-vehicle-specs .c4-spec-value span,
.c4-vehicle-specs .c4-spec-unit,
.c4-vehicle-specs .c4-spec-unit *,
.c4-vehicle-specs .c4-spec-unit span,
.c4-vehicle-specs [data-lang="specs.maxSpeedValue"],
.c4-vehicle-specs [data-lang="specs.drivingRangeValue"],
.c4-vehicle-specs [data-lang="specs.speedUnit"],
.c4-vehicle-specs [data-lang="specs.rangeUnit"] {
    font-family: 'HarmonyOS_Sans_SC', sans-serif !important;
}