/**
 * style.css - 做业务网站主样式表
 * 简洁干净风格
 * 
 * @author 小猪
 * @date 2026-03-29
 */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 页面布局 - Flexbox 实现页尾固定在底部 ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #4A4A4A;
    background-color: #F5F4F1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 主内容区域 - 自动撑大，将页尾推到底部 */
main, .main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

/* 页脚 - 固定在底部 */
.footer {
    flex-shrink: 0;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 顶部栏 ===== */
.top-header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 顶部栏容器相对定位，用于通知条绝对定位 */
.top-header {
    position: relative;
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.logo a {
    font-size: 22px;
    font-weight: 600;
    color: #6B7B8C;
    text-decoration: none;
}

/* 汉堡菜单按钮 */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.hamburger-btn span {
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== 导航栏 ===== */
.navbar {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-bottom: 1px solid #f0f0f0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #666;
    font-size: 15px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #6B7B8C;
}

.nav-link.active {
    color: #6B7B8C;
    border-bottom-color: #6B7B8C;
}

.nav-icon {
    display: none;
}

/* 移动端菜单遮罩 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.mobile-menu-overlay.active {
    display: block;
}

/* 移动端底部导航 - 默认隐藏 */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    justify-content: space-around;
    align-items: center;
    height: 56px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    flex: 1;
    height: 100%;
    transition: all 0.2s;
}

.mobile-nav-item.active {
    color: #6B7B8C;
    position: relative;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #6B7B8C 0%, #9B8E7E 100%);
    border-radius: 0 0 4px 4px;
}

.mobile-nav-item.active .mobile-nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(107, 123, 140, 0.3));
}

.mobile-nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-nav-text {
    font-size: 10px;
}

/* ===== 页面头部 - 简洁渐变 ===== */
.page-header {
    background: linear-gradient(135deg, #6B7B8C 0%, #9B8E7E 100%);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    opacity: 0.9;
}

/* ===== 搜索栏 - 简洁 ===== */
.search-bar {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #6B7B8C;
}

/* ===== 按钮 - 简洁 ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #6B7B8C;
    color: #fff;
}

.btn-primary:hover {
    background-color: #5A6A7B;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* ===== 筛选标签 - 简洁 ===== */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tag {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #666;
}

.tag:hover {
    background-color: #E8EBEE;
    color: #6B7B8C;
}

.tag.active {
    background-color: #6B7B8C;
    color: #fff;
}

/* ===== 卡片列表 - 简洁干净 ===== */
.materials-list,
.process-list,
.logistics-list {
    display: grid;
    gap: 20px;
}

.material-card,
.process-card,
.logistics-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.material-card:hover,
.process-card:hover,
.logistics-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.material-image,
.process-image {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f5f5f5;
}

.material-image img,
.process-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logistics-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f7ff;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 28px;
}

.material-info,
.process-info,
.logistics-info {
    flex: 1;
}

.material-info h3,
.process-info h3,
.logistics-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.material-desc,
.process-desc,
.logistics-desc {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 14px;
}

.material-meta,
.process-meta,
.logistics-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #888;
}

.price {
    color: #f5222d;
    font-weight: 600;
    font-size: 16px;
}

.process-capability,
.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.capability-tag,
.feature-tag {
    padding: 4px 10px;
    background-color: #E8EBEE;
    color: #6B7B8C;
    border-radius: 4px;
    font-size: 12px;
}

.price-info {
    margin-top: 8px;
}

.price-label {
    color: #888;
    font-size: 13px;
    margin-right: 6px;
}

/* ===== 关于页面 - 简洁 ===== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    background-color: #fff;
    padding: 32px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.about-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.about-section p {
    margin-bottom: 12px;
    color: #666;
    line-height: 1.8;
}

/* 关于我们页面的微信号复制 */
.about-wechat .wechat-copy {
    color: #6B7B8C;
    font-size: 16px;
    padding: 8px 0;
}

.about-wechat .wechat-copy:hover {
    color: #5A6A7B;
}

.about-wechat .copy-icon {
    opacity: 0.8;
}

/* 关于页面的复制提示 - 与页脚共用相同样式 */

/* ===== 加载和空状态 ===== */
.loading,
.empty-state {
    text-align: center;
    padding: 60px;
    color: #888;
}

/* ===== 页脚 - 简洁深色 ===== */
.footer {
    background-color: #001529;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: auto; /* 使用 auto margin 配合 flex 布局 */
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 40px;
    text-align: center;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #fff;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    line-height: 2;
    font-size: 14px;
}

.footer-section a:hover {
    color: #9B8E7E;
}

/* 微信号复制 */
.wechat-copy-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.wechat-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px 0;
}

.wechat-copy:hover {
    color: #9B8E7E;
}

.copy-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.wechat-copy:hover .copy-icon {
    opacity: 1;
}

/* 复制成功提示 - 淡入淡出，跟随鼠标 */
.copy-toast {
    position: fixed;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    visibility: visible;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

.footer-bottom .icp-number {
    margin-top: 8px;
}

.footer-bottom .icp-link,
.footer-bottom .police-link {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom .icp-link:hover,
.footer-bottom .police-link:hover {
    color: #aaa;
    text-decoration: underline;
}

.footer-bottom .icp-separator {
    margin: 0 10px;
    color: #666;
}

/* 友情链接 */
.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.footer-link-item {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    position: relative;
    display: inline-block;
}

.footer-link-item:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    /* 显示汉堡菜单按钮 */
    .hamburger-btn {
        display: flex;
    }

    /* 隐藏桌面端导航栏 */
    .navbar {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 999;
        overflow-y: auto;
    }

    .navbar.mobile-open {
        display: block;
    }

    .navbar .container {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link {
        padding: 16px 0;
        font-size: 16px;
        border-bottom: none;
    }

    .nav-icon {
        display: inline-block;
        width: 24px;
        margin-right: 12px;
    }

    .auth-header-entry {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #f0f0f0;
        width: 100%;
    }

    /* 显示移动端底部导航 */
    .mobile-bottom-nav {
        display: flex;
    }

    /* 为底部导航腾出空间 */
    .main-content {
        padding-bottom: 56px;
    }

    /* 隐藏页脚在移动端 */
    .footer {
        display: none;
    }

    .page-header h1 {
        font-size: 26px;
    }

    .material-card,
    .process-card,
    .logistics-card {
        flex-direction: column;
    }

    .material-image,
    .process-image {
        width: 100%;
        height: 180px;
    }

    .search-bar {
        flex-direction: column;
    }
}

/* ===== 金币显示样式 ===== */
.user-coins-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.user-coins-display:hover {
    color: #6B7B8C;
}

/* 金币图标 - 钱袋 */
.coin-icon-svg {
    display: inline-block;
    font-size: 20px;
    vertical-align: middle;
    line-height: 1;
}

.coin-icon-svg::before {
    content: '💰';
}

.coin-icon {
    font-size: 16px;
}

.coin-amount {
    font-variant-numeric: tabular-nums;
}

/* ===== 系统通知栏 - 悬浮在内容区顶端 ===== */
.notice-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    overflow: hidden;
    z-index: 100;
    background: transparent;
    pointer-events: none;
}

.notice-top-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
}

.notice-top-item {
    display: inline-flex;
    align-items: center;
    padding: 0 40px;
    margin-right: 60px;
    text-decoration: none;
    flex-shrink: 0;
    pointer-events: auto;
}

.notice-top-text {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.notice-top-item[href]:hover .notice-top-text {
    color: #f0f0f0;
    text-decoration: underline;
}

/* 旧版通知栏样式（保留兼容） */
.notice-bar-wrapper {
    background: transparent;
    height: 36px;
    overflow: hidden;
    position: relative;
    width: 100%;
    display: block;
    z-index: 100;
}

.notice-track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
    min-width: 100%;
}

.notice-block {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    margin-right: 60px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    cursor: default;
}

.notice-block[href]:hover .notice-block-text {
    color: #1890ff;
    text-decoration: underline;
}

.notice-block-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.notice-block-text {
    font-size: 13px;
    color: #333;
}

@media (max-width: 768px) {
    .user-coins-display {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .coin-icon {
        font-size: 14px;
    }
    
    .notice-text {
        font-size: 12px;
    }
    
    .notice-item {
        padding: 0 40px;
    }
}
