/**
 * 打印样式文件
 * Print Stylesheet
 */

@media print {
    /* ========================================
       通用打印设置
       ======================================== */
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* 页面设置 */
    @page {
        margin: 2cm;
        size: A4;
    }
    
    @page :first {
        margin-top: 3cm;
    }
    
    /* 基础排版 */
    body {
        font-family: Georgia, "Times New Roman", serif;
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    /* ========================================
       隐藏不需要打印的元素
       ======================================== */
    .header,
    .nav-menu,
    .hamburger-menu,
    .language-switcher,
    .hero-buttons,
    .back-to-top,
    .footer,
    .no-print,
    video,
    audio,
    iframe,
    .social-media,
    form,
    button:not(.print-button) {
        display: none !important;
    }
    
    /* ========================================
       标题样式
       ======================================== */
    h1, h2, h3, h4, h5, h6 {
        font-family: Arial, Helvetica, sans-serif;
        page-break-after: avoid;
        page-break-inside: avoid;
        font-weight: bold;
        margin-top: 1em;
        margin-bottom: 0.5em;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 18pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }
    
    /* ========================================
       内容样式
       ======================================== */
    p {
        margin-bottom: 1em;
        orphans: 3;
        widows: 3;
    }
    
    /* 链接处理 */
    a {
        text-decoration: underline;
        color: #000;
    }
    
    /* 显示链接URL */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        font-weight: normal;
    }
    
    /* 不显示内部链接和javascript链接的URL */
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
    
    /* ========================================
       图片处理
       ======================================== */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
        display: block;
        margin: 1em 0;
    }
    
    /* 确保logo显示 */
    .logo img {
        display: block !important;
        max-width: 200px !important;
        margin-bottom: 2em;
    }
    
    /* ========================================
       表格样式
       ======================================== */
    table {
        border-collapse: collapse;
        width: 100%;
        margin: 1em 0;
        page-break-inside: avoid;
    }
    
    table, th, td {
        border: 1px solid #ddd;
    }
    
    th, td {
        padding: 8pt;
        text-align: left;
    }
    
    th {
        font-weight: bold;
        background-color: #f5f5f5 !important;
    }
    
    /* ========================================
       列表样式
       ======================================== */
    ul, ol {
        margin: 1em 0;
        padding-left: 2em;
    }
    
    li {
        margin-bottom: 0.5em;
    }
    
    /* ========================================
       页面布局调整
       ======================================== */
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 1em 0;
    }
    
    /* 产品网格打印布局 */
    .product-grid {
        display: block;
    }
    
    .product-card {
        page-break-inside: avoid;
        margin-bottom: 2em;
        border: 1px solid #ddd;
        padding: 1em;
    }
    
    .product-image {
        max-height: 200px;
        width: auto;
        margin: 0 auto;
    }
    
    /* ========================================
       特殊元素处理
       ======================================== */
    /* 联系信息突出显示 */
    .contact-info {
        border: 2px solid #000;
        padding: 1em;
        margin: 2em 0;
        page-break-inside: avoid;
    }
    
    /* 公司信息页脚（打印版本） */
    .print-footer {
        display: block !important;
        margin-top: 2em;
        padding-top: 1em;
        border-top: 1px solid #000;
        font-size: 10pt;
        text-align: center;
    }
    
    /* ========================================
       强制分页
       ======================================== */
    .page-break {
        page-break-after: always;
    }
    
    .no-break {
        page-break-inside: avoid;
    }
    
    /* ========================================
       打印预览提示
       ======================================== */
    .print-only {
        display: block !important;
    }
    
    /* 页码（如果需要） */
    @page {
        @bottom-right {
            content: counter(page) " / " counter(pages);
        }
    }
}