﻿/* ==================== 全局 ==================== */
:root {
    --bg: #f3f5f9;
    --card: #ffffff;
    --border: #e4e9f2;
    --border-strong: #d3dbe8;
    --accent: #2563eb;
    --accent-deep: #1d4ed8;
    --accent-weak: #eaf1fe;
    --text: #182338;
    --text-2: #46536b;
    --muted: #8492a8;
    --amber: #f59e0b;
    --amber-bg: #fffaf0;
    --amber-border: #f2e3c4;
    --red: #ef4444;
    --red-bg: #fff6f6;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(16, 34, 66, 0.05);
    --shadow-md: 0 8px 24px rgba(16, 34, 66, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.65;
    color: var(--text);
    padding: 2.2rem 1rem 3rem;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-weak);
    color: var(--accent-deep);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}

.doc-container {
    max-width: 1080px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.4rem 2.6rem 2.8rem;
}

@media print {
    body {
        background: white;
        padding: 0;
    }
    .doc-container {
        box-shadow: none;
        border: none;
        padding: 0.6rem;
        max-width: 100%;
    }
    .header-right,
    .header-divider {
        display: none;
    }
}

/* ==================== 头部 ==================== */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #f7faff 0%, #f0f5fd 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.header-left {
    flex: 1;
    min-width: 240px;
    padding: 1.6rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-divider {
    width: 1px;
    background: var(--border);
    flex-shrink: 0;
}

.header-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1.6rem;
    gap: 8px;
    min-width: 168px;
    border-left: 1px solid var(--border);
    background: #fbfcfe;
}

.header-qr {
    width: 96px;
    height: 96px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px;
}

.header-qr img,
.header-qr canvas {
    width: 84px !important;
    height: 84px !important;
    border-radius: 4px;
}

.qr-label {
    font-size: 0.72rem;
    color: var(--accent-deep);
    font-weight: 600;
    background: var(--accent-weak);
    padding: 2px 10px;
    border-radius: 30px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.lang-selector {
    background: #fff;
    border-radius: 30px;
    border: 1px solid var(--border-strong);
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    color: var(--text);
    width: 100%;
    max-width: 168px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-selector:hover {
    border-color: var(--accent);
}

.lang-selector:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.subhead {
    color: var(--text-2);
    font-size: 0.92rem;
    margin-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==================== 标题 ==================== */
h1 {
    font-size: 1.62rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.h1-sub {
    font-size: 1.08rem;
    font-weight: 600;
    display: inline-block;
    color: var(--accent);
}

h2 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.18rem;
    margin-top: 2.3rem;
    margin-bottom: 1rem;
    font-weight: 650;
    color: var(--text);
    letter-spacing: -0.01em;
}

h2::before {
    content: "";
    order: -1;
    width: 5px;
    height: 1.15em;
    border-radius: 3px;
    background: var(--accent);
    flex-shrink: 0;
}

h2 i {
    color: var(--accent);
    font-size: 0.95em;
    flex-shrink: 0;
}

h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
    margin-left: 0.4rem;
}

h3 {
    font-size: 1.02rem;
    margin: 1.1rem 0 0.55rem;
    font-weight: 650;
    color: var(--text);
}

/* ==================== 信息卡片 ==================== */
.three-column-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin: 1rem 0;
}

@media (min-width: 900px) {
    .three-column-layout {
        grid-template-columns: 1.35fr 1fr;
        align-items: start;
    }
}

.info-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    height: fit-content;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.info-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border);
}

.info-card h3 i {
    color: var(--accent);
    font-size: 0.92em;
}

/* 语义色卡片（灭火剂 / 关键原材料 / 法规符合性） */
.info-card.tint-amber {
    background: var(--amber-bg);
    border-color: var(--amber-border);
}

.info-card.tint-blue {
    background: #f6f9ff;
    border-color: #d9e4f7;
}

.spec-list {
    list-style: none;
    padding: 0;
}

.spec-list li {
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef1f7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    width: 200px;
    flex-shrink: 0;
    color: var(--text-2);
    font-size: 0.92rem;
}

.spec-value {
    flex: 1;
    min-width: 160px;
    color: var(--text);
    font-size: 0.94rem;
}

.brand-value {
    word-break: break-word;
    white-space: normal;
    display: inline-block;
}

.spec-list-eu {
    list-style: none;
    padding: 0;
}

.spec-list-eu li {
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef1f7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

.spec-list-eu li:last-child {
    border-bottom: none;
}

.spec-label-eu {
    font-weight: 600;
    width: 150px;
    flex-shrink: 0;
    color: var(--text-2);
    font-size: 0.92rem;
}

/* ==================== 表格 ==================== */
#performanceTableContainer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

#performanceTableContainer table {
    min-width: 560px;
    margin: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #fff;
}

th,
td {
    border: none;
    border-bottom: 1px solid #eef1f7;
    padding: 0.68rem 1rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.92rem;
}

tr:last-child td {
    border-bottom: none;
}

th {
    background: #f7f9fc;
    font-weight: 650;
    color: var(--text-2);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-strong);
    font-size: 0.86rem;
}

.perf-table-note {
    font-size: 0.84rem;
    margin-top: 0.6rem;
    color: var(--text-2);
    background: #f8fafd;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.45rem 0.9rem;
}

/* ==================== 警告框 ==================== */
.warning-box,
.caution-box {
    border-radius: var(--radius-md);
    padding: 1.15rem 1.4rem;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

.warning-box {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    border-left: 4px solid var(--amber);
}

.caution-box {
    background: var(--red-bg);
    border-color: #f5d5d5;
    border-left: 4px solid var(--red);
}

.warning-icon {
    font-weight: 800;
    font-size: 1rem;
    margin-right: 0.5rem;
    letter-spacing: 0.03em;
}

.list-bullet {
    padding-left: 1.35rem;
    margin: 0.6rem 0;
}

.list-bullet li {
    margin: 0.42rem 0;
    font-size: 0.93rem;
    color: var(--text);
}

/* ==================== 合规声明 ==================== */
.compliance-badge {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.1rem 1.35rem;
    border-radius: var(--radius-md);
    font-size: 0.93rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
    line-height: 1.7;
}

.compliance-badge table {
    margin: 0.5rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.compliance-badge th,
.compliance-badge td {
    padding: 0.45rem 0.8rem;
}

.svhc-statement {
    margin: 0.9rem 0 1.2rem;
    padding: 0.6rem 1rem;
    color: var(--text-2);
    background: #f6faf7;
    border: 1px solid #d7ead9;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.65;
}

hr {
    margin: 1.6rem 0;
    border: none;
    height: 1px;
    background: var(--border);
}

footer {
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

/* ==================== 标志图标 ==================== */
.marking-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
    justify-content: flex-start;
    margin: 1rem 0 1.5rem;
    background: #f8fafd;
    padding: 1.1rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-strong);
}

.marking-icons .icon-item {
    text-align: center;
    min-width: 120px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marking-icons img {
    width: 84px;
    height: auto;
    max-height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* ==================== 黑色警示框 ==================== */
.battery-warning-blackbox {
    background-color: #0d1117;
    border-radius: var(--radius-md);
    padding: 1.5rem 1.6rem;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    color: #ffffff;
}

.warning-text-section {
    flex: 2;
    min-width: 220px;
}

.warning-text-section .warning-head {
    background-color: #ffd100;
    color: #0d1117;
    display: inline-block;
    padding: 0.22rem 0.9rem;
    font-weight: 800;
    font-size: 1.22rem;
    margin-bottom: 0.7rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.warning-text-section .warning-head i {
    color: #0d1117;
    margin-right: 0.5rem;
}

.warning-text-section .keep-out {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0.45rem 0;
    background: white;
    color: #0d1117;
    display: inline-block;
    padding: 0.12rem 0.75rem;
    border-radius: 5px;
}

.warning-text-section .warning-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    background: white;
    color: #1c2430;
    padding: 0.4rem 0.85rem;
    border-radius: 5px;
    display: inline-block;
}

.warning-icon-right {
    flex: 0 0 auto;
}

.warning-icon-right img {
    width: 128px;
    height: auto;
    display: block;
}

/* ==================== 附件下载 ==================== */
.file-links {
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.file-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #fff;
    border: 1px solid var(--border-strong);
    padding: 0.68rem 1.15rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.file-links a i {
    color: #d92d20;
}

.file-links a:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--accent-deep);
}

/* ==================== 符号说明 ==================== */
.symbol-row {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1rem 0;
}

.symbol-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.7rem 0.9rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.symbol-icon {
    flex-shrink: 0;
    width: 58px;
    text-align: center;
}

.symbol-icon img {
    max-width: 48px;
    max-height: 48px;
}

.symbol-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text);
}

/* ==================== 产品图 ==================== */
#qrCodeContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.product-image-container {
    margin: 1.3rem 0 1.8rem;
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fbfcfe 0%, #f5f8fc 100%);
    text-align: center;
}

.product-image-title {
    margin: 0 0 0.9rem;
    color: var(--text-2);
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.product-image-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 430px);
    min-height: 220px;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--shadow-sm);
    margin: 0.35rem;
    vertical-align: top;
}

.product-image-frame img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 6px;
}

/* ==================== 废电池管理 ==================== */
.waste-container {
    background: #fbfcfe;
    border-radius: var(--radius-md);
    padding: 0.4rem 1.5rem 1.3rem;
    border: 1px solid var(--border);
}

.waste-container p {
    font-size: 0.93rem;
    color: var(--text);
}

.eu-representative-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.eu-representative-card h3 {
    margin-top: 0;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.7rem 2rem;
    }

    .doc-container {
        padding: 1.3rem 1.1rem 1.8rem;
        border-radius: var(--radius-md);
    }

    h1 {
        font-size: 1.28rem;
    }

    .h1-sub {
        font-size: 0.98rem;
        display: block;
        margin-top: 0.15rem;
    }

    h2 {
        font-size: 1.05rem;
        margin-top: 1.8rem;
    }

    .header-main {
        flex-direction: column;
        align-items: stretch;
    }

    .header-divider {
        width: 100%;
        height: 1px;
    }

    .header-right {
        padding: 1rem 1.4rem;
        border-left: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .header-qr {
        width: 78px;
        height: 78px;
    }

    .header-qr img,
    .header-qr canvas {
        width: 66px !important;
        height: 66px !important;
    }

    .lang-selector {
        max-width: 150px;
    }

    .three-column-layout {
        grid-template-columns: 1fr;
    }

    .spec-list li,
    .spec-list-eu li {
        flex-direction: column;
        gap: 0.1rem;
    }

    .spec-label,
    .spec-label-eu {
        width: auto;
    }

    .marking-icons {
        justify-content: center;
    }

    .marking-icons img {
        width: 64px;
        max-height: 56px;
    }

    .marking-icons .icon-item {
        min-width: 96px;
        padding: 0.6rem 0.8rem;
    }

    .warning-icon-right img {
        width: 96px;
    }

    .warning-text-section .warning-head {
        font-size: 1.05rem;
    }

    .warning-text-section .keep-out {
        font-size: 0.95rem;
    }

    th,
    td {
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }

    #performanceTableContainer table {
        min-width: 460px;
    }

    .file-links a {
        width: 100%;
        justify-content: flex-start;
    }

    .symbol-item {
        gap: 0.9rem;
    }

    .product-image-frame {
        min-height: 170px;
    }

    .product-image-frame img {
        max-height: 240px;
    }

    .waste-container {
        padding: 0.3rem 1rem 1.1rem;
    }
}
