/* ============================================================
 * 产品供应模块样式 - product.css
 * ============================================================ */

/* 面包屑 */
.breadcrumb { background: #fff; border-bottom: 1px solid #f0f0f0; }
.breadcrumb .container { padding: 12px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #f26a1b; }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }
.breadcrumb .cur { color: #999; }

/* 主体布局 */
.main { padding: 20px 0 40px; background: #f4f6f9; min-height: 500px; }
.container { width: 1200px; margin: 0 auto; }
.clearfix::after { content: ""; display: table; clear: both; }

.prod-main { float: left; width: 860px; }
.prod-side { float: right; width: 320px; }

/* 区块标题 */
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #e8ecf1; }
.section-head h2,
.section-head h3 { margin: 0; font-size: 18px; color: #222; font-weight: 700; }
.icon-line { display: inline-block; width: 4px; height: 18px; background: #f26a1b; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.sub-title { font-size: 13px; color: #999; font-weight: normal; }

/* 分类导航 */
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding: 14px 20px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.cat-nav a { display: inline-block; padding: 5px 16px; border-radius: 20px; font-size: 13px; color: #666; background: #f5f6f8; transition: .2s; }
.cat-nav a:hover { color: #f26a1b; background: #fff0e6; }
.cat-nav a.on { color: #fff; background: #f26a1b; }

/* 筛选条 */
.filter-bar { background: #fff; border-radius: 12px; box-shadow: 0 12px 34px rgba(20,28,40,.07); padding: 16px 18px; margin-bottom: 18px; }
.filter-row { display: flex; align-items: flex-start; gap: 0; margin-bottom: 10px; font-size: 13px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { color: #999; width: 56px; flex-shrink: 0; padding-top: 3px; }
.filter-opts { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.filter-opts a { padding: 3px 12px; color: #666; border-radius: 4px; border: 1px solid transparent; }
.filter-opts a:hover, .filter-opts a.on { background: #fff4ec; color: #f26a1b; border-color: #ffd4c2; }
.filter-sort { display: flex; align-items: center; gap: 0; }
.filter-sort .sort-item { padding: 5px 15px; border: 1px solid #e8e8e8; border-right: none; font-size: 13px; color: #666; cursor: pointer; background: #fff; }
.filter-sort .sort-item:last-child { border-right: 1px solid #e8e8e8; border-radius: 0 4px 4px 0; }
.filter-sort .sort-item:first-child { border-radius: 4px 0 0 4px; }
.filter-sort .sort-item.on { background: #f26a1b; color: #fff; border-color: #f26a1b; }

/* 空状态 */
.empty-box { padding: 60px 20px; text-align: center; color: #999; font-size: 14px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }

/* ---- 产品列表网格 ---- */
.prod-grid { display: flex; flex-wrap: wrap; gap: 16px; background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.prod-card { display: flex; flex-direction: column; width: calc((100% - 48px) / 4); border-radius: 8px; overflow: hidden; border: 1px solid #f0f2f5; transition: box-shadow .2s, border-color .2s; text-decoration: none; color: inherit; background: #fff; }
.prod-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); border-color: #ffd4c2; }

.prod-card-thumb { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; background: #edf0f3; }
.prod-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-card-thumb .prod-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 40px; background: #f5f6f8; }
.prod-card-thumb .badge-top { position: absolute; top: 8px; left: 8px; padding: 2px 8px; background: #f26a1b; color: #fff; border-radius: 3px; font-size: 11px; }
.prod-card-thumb .badge-rec { position: absolute; top: 8px; right: 8px; padding: 2px 8px; background: #1890ff; color: #fff; border-radius: 3px; font-size: 11px; }

.prod-card-body { padding: 10px 12px 14px; flex: 1; display: flex; flex-direction: column; }
.prod-card-title { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: #222; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-card:hover .prod-card-title { color: #f26a1b; }
.prod-card-price { margin-bottom: 8px; }
.prod-card-price strong { font-size: 18px; color: #e4393c; font-weight: 700; }
.prod-card-price .price-nego { font-size: 14px; color: #f26a1b; }
.prod-card-meta { display: flex; justify-content: space-between; font-size: 12px; color: #999; margin-top: auto; }

/* ---- 产品详情 ---- */
.prod-detail { background: #fff; border-radius: 10px; padding: 28px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.detail-head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #f0f2f5; }
.detail-title { margin: 0 0 12px; font-size: 24px; line-height: 1.4; color: #222; font-weight: 700; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-tags .tag { padding: 3px 12px; background: #fff0e6; color: #f26a1b; border-radius: 4px; font-size: 12px; }
.detail-tags .tag-top { background: #fff0e6; color: #f26a1b; }
.detail-tags .tag-rec { background: #e6f7ff; color: #1890ff; }

/* 产品概览区（左图右信息） */
.detail-overview { display: flex; gap: 28px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #f0f2f5; }
.overview-left { flex: 0 0 360px; }
.overview-right { flex: 1; min-width: 0; }

.detail-cover { width: 360px; height: 270px; border-radius: 10px; overflow: hidden; background: #edf0f3; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #ccc; font-size: 48px; }
.detail-cover-empty span { font-size: 13px; margin-top: 8px; }

.price-row { margin-bottom: 16px; padding: 14px 18px; background: #fef7f0; border-radius: 8px; }
.price-big { font-size: 14px; color: #e4393c; font-weight: normal; }
.price-big em { font-size: 32px; font-style: normal; font-weight: 700; }
.price-unit { font-size: 13px; color: #999; margin-left: 4px; }
.price-big.price-nego { font-size: 20px; color: #f26a1b; }

.info-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.info-table tr { border-bottom: 1px solid #f5f5f5; }
.info-table th { width: 80px; padding: 10px 0; font-size: 13px; color: #999; font-weight: normal; text-align: left; vertical-align: top; }
.info-table td { padding: 10px 0; font-size: 14px; color: #333; }

.contact-box { padding: 14px 18px; background: #f8f9fb; border-radius: 8px; }
.contact-company { font-size: 15px; font-weight: 700; color: #222; margin-bottom: 10px; }
.contact-item { font-size: 13px; color: #666; margin-bottom: 6px; }
.contact-item span { color: #999; }
.contact-item strong { color: #f26a1b; font-size: 15px; }

/* 详细描述区块 */
.detail-section { margin-top: 4px; }
.detail-section h3 { font-size: 18px; color: #222; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid #f26a1b; display: inline-block; }
.detail-body { font-size: 15px; line-height: 1.9; color: #333; }
.detail-body p { margin: 0 0 14px; }
.detail-body h3 { margin: 22px 0 12px; font-size: 17px; color: #222; }
.detail-body img { max-width: 100%; height: auto; border-radius: 6px; }

/* 相关产品 */
.related-products { margin-top: 20px; background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.related-card { display: block; text-decoration: none; border-radius: 8px; overflow: hidden; border: 1px solid #f0f2f5; transition: .2s; }
.related-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); border-color: #ffd4c2; }
.related-thumb { height: 130px; background: #edf0f3; overflow: hidden; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 32px; }
.related-name { padding: 8px 10px 4px; font-size: 13px; color: #333; line-height: 1.4; }
.related-price { padding: 0 10px 10px; font-size: 14px; color: #e4393c; font-weight: 700; }

/* 侧边栏 */
.side-box { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.side-title { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 14px; padding-left: 10px; border-left: 3px solid #f26a1b; }
.side-list { margin: 0; padding: 0; list-style: none; }
.side-list li { padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: #444; font-size: 14px; line-height: 1.5; display: flex; justify-content: space-between; align-items: center; gap: 8px; transition: color .2s; }
.side-list a:hover { color: #f26a1b; }
.side-name { flex: 1; min-width: 0; }
.side-price { font-size: 13px; color: #e4393c; font-weight: 700; white-space: nowrap; }

.hot-list li { display: flex; gap: 10px; align-items: flex-start; }
.hot-list .rank { flex: 0 0 20px; width: 20px; height: 20px; line-height: 20px; text-align: center; background: #e8ecf1; color: #666; border-radius: 3px; font-size: 12px; margin-top: 2px; }
.hot-list .rank.top { background: #f26a1b; color: #fff; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 24px; }
.pagination a,
.pagination span { display: inline-block; padding: 8px 14px; border-radius: 6px; font-size: 14px; background: #fff; color: #666; border: 1px solid #e8ecf1; }
.pagination a:hover { background: #f26a1b; color: #fff; border-color: #f26a1b; }
.pagination .cur-page { background: #f26a1b; color: #fff; border-color: #f26a1b; }
.pagination .disabled { color: #bbb; cursor: not-allowed; }
.pagination .page-info { border: 0; background: transparent; color: #999; }
.pagination .dots { border: 0; background: transparent; color: #999; padding: 8px 6px; }

/* 响应式 */
@media (max-width: 1220px) {
    .container { width: auto; margin: 0 15px; }
    .prod-main { float: none; width: auto; }
    .prod-side { float: none; width: auto; margin-top: 20px; }
}
@media (max-width: 768px) {
    .prod-card { width: calc((100% - 16px) / 2); }
    .detail-overview { flex-direction: column; }
    .overview-left { flex: none; }
    .detail-cover { width: 100%; height: auto; aspect-ratio: 4/3; }
    .detail-title { font-size: 20px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .prod-card { width: 100%; }
}
