/* ============================================
   企业网系统前台样式 - 1800px宽度
   PowerB2B v1.0
   ============================================ */

/* ======== Reset ======== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: #333; background: #f5f5f5; line-height: 1.6; }
a { color: #2563EB; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1D4ED8; }
img { max-width: 100%; border: 0; vertical-align: middle; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; outline: none; border: none; }
button { cursor: pointer; }
.clearfix::after { content: ""; display: block; clear: both; }
.container { width: 100%; background: #fff; }

/* ======== 全屏通用 inner ======== */
.top-bar .inner, .header .inner, .nav .inner, .friend-links .inner, .footer .inner, .main { width: 1800px; margin: 0 auto; }

/* ======== 顶部条 ======== */
.top-bar { background: #f0f2f5; border-bottom: 1px solid #e0e0e0; }
.top-bar .inner { height: 36px; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 13px; color: #666; }
.top-bar .left a, .top-bar .right a { color: #666; margin: 0 8px; }
.top-bar .left a:hover, .top-bar .right a:hover { color: #2563EB; }
.top-bar .right span { margin: 0 4px; color: #ddd; }

/* ======== Logo + 搜索区 ======== */
.header { background: #fff; padding: 20px 0; border-bottom: 2px solid #2563EB; }
.header .inner { display: flex; align-items: center; gap: 40px; padding: 0 20px; }
.header .logo { flex-shrink: 0; }
.header .logo a { font-size: 32px; font-weight: bold; color: #2563EB; letter-spacing: 2px; }
.header .logo .sub { font-size: 12px; color: #999; margin-left: 10px; }
.search-box { flex: 1; max-width: 800px; }
.search-tabs { display: flex; gap: 2px; margin-bottom: 0; }
.search-tabs button { padding: 6px 16px; background: #f0f0f0; color: #666; border-radius: 4px 4px 0 0; font-size: 13px; }
.search-tabs button.active { background: #2563EB; color: #fff; }
.search-form { display: flex; border: 2px solid #2563EB; border-radius: 0 0 4px 4px; overflow: hidden; }
.search-form input { flex: 1; padding: 12px 16px; border: none; font-size: 15px; }
.search-form button { padding: 12px 40px; background: #2563EB; color: #fff; font-size: 15px; font-weight: bold; }
.search-form button:hover { background: #1D4ED8; }
.search-hot { margin-top: 8px; font-size: 12px; color: #999; }
.search-hot a { color: #666; margin-right: 12px; }
.search-hot a:hover { color: #2563EB; }
.header-right { margin-left: auto; display: flex; gap: 10px; }
.header-right a { padding: 8px 20px; border: 1px solid #2563EB; color: #2563EB; border-radius: 4px; font-size: 14px; }
.header-right a.primary { background: #2563EB; color: #fff; }

/* ======== 导航栏 ======== */
.nav { background: #2563EB; }
.nav .inner { display: flex; padding: 0 20px; }
.nav .inner a { color: #fff; padding: 14px 30px; font-size: 16px; font-weight: 500; transition: background 0.2s; }
.nav .inner a:hover, .nav .inner a.active { background: #1D4ED8; }

/* ======== 主内容区 ======== */
.main { width: 1800px; margin: 15px auto; padding: 0 20px; }

/* ======== 首页分类+Banner+侧栏 ======== */
.hero-section { display: flex; gap: 15px; margin-bottom: 15px; }
.category-sidebar { width: 260px; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; }
.category-sidebar .cat-head { background: #2563EB; color: #fff; padding: 10px 15px; font-size: 15px; font-weight: bold; border-radius: 4px 4px 0 0; }
.category-sidebar ul li { border-bottom: 1px solid #f0f0f0; }
.category-sidebar ul li:last-child { border-bottom: none; }
.category-sidebar .cat-item { padding: 10px 15px; cursor: pointer; transition: background 0.2s; position: relative; }
.category-sidebar .cat-item:hover { background: #f8f9fa; }
.category-sidebar .cat-item .cat-name { font-weight: bold; font-size: 14px; color: #333; }
.category-sidebar .cat-item .cat-sub { font-size: 12px; color: #999; margin-top: 4px; }
.category-sidebar .cat-item .cat-sub a { color: #999; margin-right: 8px; }
.category-sidebar .cat-item .cat-sub a:hover { color: #2563EB; }
.category-sidebar .cat-item::after { content: "›"; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #ccc; font-size: 18px; }

.banner-center { flex: 1; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; overflow: hidden; }
.banner-center img { width: 100%; height: 100%; object-fit: cover; min-height: 400px; }

.user-sidebar { width: 220px; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; }
.user-sidebar .user-box { padding: 20px; text-align: center; border-bottom: 1px solid #f0f0f0; }
.user-sidebar .user-box .avatar { width: 60px; height: 60px; border-radius: 50%; background: #f0f0f0; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: #999; margin-bottom: 10px; }
.user-sidebar .user-box .btn-login { display: inline-block; padding: 8px 24px; background: #2563EB; color: #fff; border-radius: 4px; font-size: 14px; margin: 4px; }
.user-sidebar .user-box .btn-reg { display: inline-block; padding: 8px 24px; background: #fff; color: #2563EB; border: 1px solid #2563EB; border-radius: 4px; font-size: 14px; margin: 4px; }
.user-sidebar .quick-links { padding: 10px; }
.user-sidebar .quick-links a { display: block; padding: 8px 15px; color: #666; font-size: 13px; border-bottom: 1px dashed #eee; }
.user-sidebar .quick-links a:hover { color: #2563EB; padding-left: 20px; }

/* ======== 板块通用样式 ======== */
.section { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 15px; }
.section-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 2px solid #2563EB; }
.section-header h2 { font-size: 18px; color: #333; }
.section-header h2 .icon { display: inline-block; width: 4px; height: 18px; background: #2563EB; margin-right: 8px; vertical-align: middle; border-radius: 2px; }
.section-header .more { font-size: 13px; color: #999; }
.section-body { padding: 15px 20px; }

/* ======== 产品网格 ======== */
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; }
.product-card { border: 1px solid #f0f0f0; border-radius: 4px; overflow: hidden; transition: all 0.3s; cursor: pointer; }
.product-card:hover { box-shadow: 0 4px 16px rgba(37,99,235,0.15); border-color: #2563EB; transform: translateY(-2px); }
.product-card .thumb { width: 100%; height: 200px; background: #f8f8f8; overflow: hidden; position: relative; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #ddd; background: linear-gradient(135deg, #f0f4ff, #e8eeff); }
.product-card .info { padding: 10px; }
.product-card .info .title { font-size: 13px; color: #333; line-height: 1.4; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-card .info .title:hover { color: #2563EB; }
.product-card .info .price { font-size: 16px; color: #e74c3c; font-weight: bold; margin-top: 6px; }
.product-card .info .price .unit { font-size: 12px; font-weight: normal; }
.product-card .info .area { font-size: 12px; color: #999; margin-top: 4px; }

/* ======== 信息列表 ======== */
.info-list { }
.info-list li { padding: 10px 0; border-bottom: 1px dashed #eee; display: flex; align-items: center; }
.info-list li:last-child { border-bottom: none; }
.info-list li .dot { color: #2563EB; margin-right: 8px; }
.info-list li .title { flex: 1; color: #333; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-list li .title:hover { color: #2563EB; }
.info-list li .area { color: #999; font-size: 12px; margin: 0 15px; flex-shrink: 0; }
.info-list li .date { color: #bbb; font-size: 12px; flex-shrink: 0; }

/* ======== 信息列表项（div版本，用于求购/招商/招聘） ======== */
.info-list .info-item { padding: 15px 0; border-bottom: 1px dashed #eee; cursor: pointer; transition: background 0.2s; }
.info-list .info-item:hover { background: #f8f9fa; }
.info-list .info-item:last-child { border-bottom: none; }
.info-list .info-main .title { font-size: 14px; color: #333; display: block; margin-bottom: 6px; }
.info-list .info-main .title:hover { color: #2563EB; }
.info-list .info-main .info-desc { font-size: 13px; color: #999; line-height: 1.5; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-list .info-main .info-meta { display: flex; gap: 20px; font-size: 12px; color: #999; flex-wrap: wrap; align-items: center; }
.info-list .info-main .info-meta .meta-item strong { color: #2563EB; }
.info-list .info-main .info-meta .meta-item.date { margin-left: auto; color: #bbb; }

/* ======== 企业/品牌卡片补充样式 ======== */
.company-card .company-info { overflow: hidden; }
.company-card .company-name { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 4px; display: block; }
.company-card .company-name:hover { color: #2563EB; }
.company-card .company-business { font-size: 12px; color: #999; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.company-card .company-meta { font-size: 12px; color: #999; margin-bottom: 4px; }
.company-card .company-tel { font-size: 13px; color: #2563EB; font-weight: bold; }

/* ======== 双栏布局 ======== */
.dual-col { display: flex; gap: 15px; }
.dual-col .left-col { flex: 1; }
.dual-col .right-col { width: 380px; }

/* ======== 企业名录卡片 ======== */
.company-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.company-card { border: 1px solid #f0f0f0; border-radius: 4px; padding: 15px; transition: all 0.3s; }
.company-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-color: #2563EB; }
.company-card .logo { width: 60px; height: 60px; border-radius: 4px; background: #f0f0f0; float: left; margin-right: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #999; font-weight: bold; }
.company-card .name { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 4px; }
.company-card .name:hover { color: #2563EB; }
.company-card .biz { font-size: 12px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-card .vip-tag { display: inline-block; padding: 2px 6px; background: #FEF3C7; color: #D97706; border-radius: 2px; font-size: 11px; margin-left: 5px; }

/* ======== 新闻列表 ======== */
.news-list { }
.news-list li { padding: 12px 0; border-bottom: 1px dashed #eee; display: flex; align-items: center; }
.news-list li:last-child { border-bottom: none; }
.news-list li .title { flex: 1; font-size: 14px; color: #333; }
.news-list li .title:hover { color: #2563EB; }
.news-list li .date { color: #bbb; font-size: 12px; margin-left: 15px; }

/* ======== 广告位 ======== */
.ad-row { display: flex; gap: 15px; margin-bottom: 15px; }
.ad-item { flex: 1; height: 100px; background: #f0f4ff; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #666; font-size: 14px; overflow: hidden; }
.ad-item img { width: 100%; height: 100%; object-fit: cover; }

/* ======== 友情链接 ======== */
.friend-links { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 15px 20px; margin-bottom: 0; }
.friend-links .links-title { font-size: 14px; font-weight: bold; color: #666; margin-bottom: 10px; }
.friend-links .links-body a { display: inline-block; padding: 4px 12px; color: #666; font-size: 13px; }
.friend-links .links-body a:hover { color: #2563EB; }

/* ======== 页脚 ======== */
.footer { background: #2d3748; color: #a0aec0; padding: 30px 0; margin-top: 0; }
.footer .inner { padding: 0 20px; text-align: center; }
.footer .links { margin-bottom: 15px; }
.footer .links a { color: #a0aec0; margin: 0 15px; font-size: 13px; }
.footer .links a:hover { color: #fff; }
.footer p { font-size: 12px; line-height: 2; }

/* ======== 分页 ======== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; padding: 20px 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-block; padding: 8px 14px; border: 1px solid #e0e0e0; color: #666; border-radius: 4px; font-size: 14px; }
.pagination a:hover { border-color: #2563EB; color: #2563EB; }
.pagination .current { background: #2563EB; color: #fff; border-color: #2563EB; }
.pagination .ellipsis { border: none; }
.pagination .info { border: none; color: #999; }

/* ======== 面包屑 ======== */
.breadcrumb { padding: 10px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #2563EB; }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }

/* ======== 列表页通用 ======== */
.list-layout { display: flex; gap: 15px; }
.list-layout .main-col { flex: 1; }
.list-layout .side-col { width: 300px; }

.filter-bar { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 15px; padding: 15px 20px; }
.filter-bar .filter-row { display: flex; align-items: center; padding: 6px 0; border-bottom: 1px dashed #eee; }
.filter-bar .filter-row:last-child { border-bottom: none; }
.filter-bar .filter-label { width: 80px; color: #999; font-size: 13px; flex-shrink: 0; }
.filter-bar .filter-options { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.filter-bar .filter-options a { padding: 4px 12px; color: #666; font-size: 13px; border-radius: 3px; }
.filter-bar .filter-options a:hover, .filter-bar .filter-options a.active { background: #2563EB; color: #fff; }

.list-toolbar { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px 4px 0 0; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #2563EB; }
.list-toolbar .total { font-size: 13px; color: #666; }
.list-toolbar .total strong { color: #2563EB; }
.list-toolbar .sort a { padding: 4px 12px; color: #666; font-size: 13px; }
.list-toolbar .sort a.active { color: #2563EB; font-weight: bold; }

/* ======== 详情页 ======== */
.detail-header { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 20px; margin-bottom: 15px; }
.detail-header h1 { font-size: 22px; color: #333; margin-bottom: 10px; }
.detail-meta { display: flex; gap: 30px; color: #999; font-size: 13px; padding: 10px 0; border-top: 1px solid #f0f0f0; }
.detail-content { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 20px; margin-bottom: 15px; }
.detail-content .content-body { font-size: 14px; line-height: 2; color: #333; }
.detail-content .content-body p { margin-bottom: 15px; }
.detail-content .content-body img { max-width: 100%; margin: 10px 0; }
.detail-info-table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.detail-info-table th { width: 120px; text-align: right; color: #999; font-weight: normal; padding: 8px 15px; background: #f8f9fa; border: 1px solid #eee; }
.detail-info-table td { padding: 8px 15px; border: 1px solid #eee; }

/* ======== 会员中心 ======== */
.member-layout { display: flex; gap: 15px; }
.member-side { width: 220px; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; }
.member-side .side-header { background: #2563EB; color: #fff; padding: 15px; text-align: center; border-radius: 4px 4px 0 0; }
.member-side .side-header .username { font-size: 16px; font-weight: bold; }
.member-side ul li a { display: block; padding: 12px 20px; color: #666; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.member-side ul li a:hover, .member-side ul li a.active { background: #f0f4ff; color: #2563EB; border-left: 3px solid #2563EB; }
.member-main { flex: 1; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; padding: 20px; }

/* ======== 表单 ======== */
.form-row { margin-bottom: 20px; }
.form-row label { display: block; margin-bottom: 6px; font-weight: bold; color: #555; font-size: 14px; }
.form-row label .req { color: #e74c3c; }
.form-row input[type="text"], .form-row input[type="password"], .form-row input[type="email"], .form-row input[type="tel"], .form-row select, .form-row textarea { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: #2563EB; }
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row .hint { font-size: 12px; color: #999; margin-top: 5px; }
.btn-submit { padding: 12px 40px; background: #2563EB; color: #fff; border-radius: 4px; font-size: 15px; font-weight: bold; }
.btn-submit:hover { background: #1D4ED8; }

/* ======== 登录/注册框 ======== */
.auth-box { max-width: 500px; margin: 40px auto; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 30px; box-shadow: 0 2px 20px rgba(0,0,0,0.05); }
.auth-box h2 { text-align: center; margin-bottom: 25px; color: #333; }
.auth-box .tabs { display: flex; margin-bottom: 25px; border-bottom: 2px solid #f0f0f0; }
.auth-box .tabs a { flex: 1; text-align: center; padding: 12px; font-size: 16px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.auth-box .tabs a.active { color: #2563EB; border-bottom-color: #2563EB; }

/* ======== 标签 ======== */
.tag { display: inline-block; padding: 2px 8px; font-size: 11px; border-radius: 2px; margin-right: 4px; }
.tag-new { background: #FEF3C7; color: #D97706; }
.tag-hot { background: #FEE2E2; color: #DC2626; }
.tag-top { background: #DBEAFE; color: #2563EB; }
.tag-vip { background: #fef3c7; color: #b45309; }

/* ======== 空状态 ======== */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-state .icon { font-size: 48px; margin-bottom: 15px; }

/* ======== 公告/动态侧栏 ======== */
.side-notice { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 15px; }
.side-notice .notice-header { padding: 10px 15px; border-bottom: 1px solid #f0f0f0; font-weight: bold; color: #333; font-size: 14px; }
.side-notice .notice-body { padding: 10px 15px; }
.side-notice .notice-body li { padding: 6px 0; font-size: 13px; }
.side-notice .notice-body li a { color: #666; }
.side-notice .notice-body li a:hover { color: #2563EB; }
