﻿/* danye.css - 统一单页样式表 */

/* ==================== 通用页面样式 ==================== */

/* 页面主要区域样式 */
.page-section {
    padding: 40px 20px;
    background-color: #f5f1e8;
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 修复库存展示区域样式 */
.contact-area {
    background-color: #F9F5EC;
    padding: 40px;
    margin-top: 30px;
    text-align: center; /* 改为居中对齐 */
    border-radius: 8px;
    width: 100%; /* 确保占满容器 */
    box-sizing: border-box; /* 确保padding不影响宽度 */
}

/* 图片样式调整 */
.contact-area img {
    height: auto; /* 保持比例 */
    margin: 15px 0; /* 图片上下间距 */
    display: block; /* 让图片独占一行 */
    margin-left: auto;
    margin-right: auto; /* 图片居中 */
    border-radius: 5px; /* 可选：添加圆角 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 可选：添加阴影 */
}

/* 按钮样式保持居中 */
.contact-btn {
    display: inline-block;
    background-color: #8b7355;
    color: white !important;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    margin-top: 20px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.contact-btn:hover {
    background-color: #6d5d4b;
    transform: translateY(-2px);
}

/* ==================== 代找书籍页面专用样式 ==================== */

/* 代找流程网格 */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* 流程卡片 */
.process-card {
    background-color: #fff;
    padding: 25px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 流程编号 */
.process-number {
    width: 40px;
    height: 40px;
    background-color: #8b7355;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 auto 15px;
}

.process-card h4 {
    color: #3d2c1e;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.process-card p {
    color: #6d5d4b;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* ==================== 联系我们页面专用样式 ==================== */

/* 联系信息容器 */
.contact-info-container {
    background-color: #f9f5ec;
    padding: 40px;
    position: relative;
}

/* 联系项目 */
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #d4c9a6;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-details h3 {
    color: #3d2c1e;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.contact-details p {
    color: #6d5d4b;
    line-height: 1.6;
}

.contact-details a {
    color: #8b7355;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: #3d2c1e;
    text-decoration: underline;
}

/* 社交媒体图标样式 */
.social-icons {
    font-size: 1.8rem;
}

.social-icons a {
    margin-right: 15px;
    color: #8b7355;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #3d2c1e;
}

/* ==================== 批发书籍页面专用样式 ==================== */

/* 价格表格样式 */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-table th {
    background-color: #d4c9a6;
    color: #3d2c1e;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.price-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e8dfd0;
    color: #3d2c1e;
    background-color: #f9f5ec;
}

.price-table tr:nth-child(even) td {
    background-color: #f5f1e8;
}

.price-table tr:hover td {
    background-color: #ede8dc;
}

/* 价格表格圆角处理 */
.price-table thead tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

.price-table thead tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

.price-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.price-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* ==================== 响应式设计 ==================== */

/* 中等屏幕设备（平板） */
@media (max-width: 768px) {
    /* 通用响应式 */
    .page-container {
        max-width: 95%;
    }
    
    .contact-area,
    .contact-info-container {
        padding: 25px;
    }
    
    .contact-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
    
    /* 代找页面响应式 */
    .process-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .process-card {
        padding: 20px 15px;
    }
    
    /* 联系我们页面响应式 */
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* 社交媒体图标在移动端适当缩小 */
    .social-icons {
        font-size: 1.5rem;
    }
    
    /* 批发页面响应式 - 增强表格适配 */
    .price-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* 平滑滚动 */
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .price-table table {
        min-width: 600px; /* 确保表格有最小宽度以便横向滚动 */
    }
    
    .price-table th,
    .price-table td {
        padding: 10px;
        font-size: 0.9rem;
        min-width: 80px; /* 避免单元格过窄 */
    }
    
    /* 移动端移除表格圆角 */
    .price-table thead tr:first-child th:first-child,
    .price-table thead tr:first-child th:last-child,
    .price-table tbody tr:last-child td:first-child,
    .price-table tbody tr:last-child td:last-child {
        border-radius: 0;
    }
    
    /* 关键：修复图片在移动端的显示问题 */
    .contact-area {
        padding: 25px 15px !important;
        margin: 20px 0 !important;
        overflow: hidden; /* 防止内容溢出 */
    }
    
    .contact-area img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important; /* 确保不固定宽度 */
        display: block !important;
        margin: 10px auto !important;
        border-radius: 5px !important;
    }
    
    /* 如果有包裹图片的段落，也需要调整 */
    .contact-area p {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        overflow: hidden; /* 防止图片撑破容器 */
    }
    
    /* 调整标题和文本大小 */
    .section-title, 
    .contact-area h3 {
        font-size: 1.5rem !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }
}

/* 小屏幕设备（手机） */
@media (max-width: 480px) {
    /* 小屏幕优化 */
    .page-section {
        padding: 30px 15px;
    }
    
    .contact-area h3,
    .contact-details h3 {
        font-size: 1.3rem;
    }
    
    .process-card h4 {
        font-size: 1.1rem;
    }
    
    .process-card p,
    .contact-area p,
    .contact-details p {
        font-size: 0.9rem;
    }
    
    /* 进一步调整表格 */
    .price-table th,
    .price-table td {
        padding: 8px 6px !important;
        font-size: 13px !important;
    }
    
    .price-table table {
        min-width: 500px !important;
    }
    
    /* 调整图片间距 */
    .contact-area img {
        margin: 8px auto !important;
        max-width: 95% !important; /* 给左右留一点空间 */
    }
    
    .contact-area {
        padding: 15px 10px !important;
    }
    
    /* 调整按钮大小 */
    .contact-btn {
        padding: 10px 20px !important;
        font-size: 15px !important;
    }
    
    /* 调整页面标题 */
    h2 {
        font-size: 1.3rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
}

/* 超小屏幕设备（如iPhone SE等） */
@media (max-width: 360px) {
    .price-table th,
    .price-table td {
        padding: 6px 4px !important;
        font-size: 12px !important;
    }
    
    .price-table table {
        min-width: 450px !important;
    }
    
    .contact-area img {
        margin: 5px auto !important;
        max-width: 90% !important; /* 更小的屏幕留更多空间 */
    }
    
    .nav-item {
        font-size: 14px !important;
        padding: 10px 0 !important;
    }
    
    .contact-area {
        padding: 12px 8px !important;
    }
}

/* 打印样式 */
@media print {
    .page-section {
        background-color: white;
        padding: 20px;
    }
    
    .contact-area,
    .contact-info-container,
    .process-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .contact-btn {
        display: none;
    }
    
    .social-icons {
        display: none;
    }
}