/* 1688518.org 业务样式 - 1:1 仿 bbzsh + i18n */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #222; line-height: 1.5; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === 顶条 === */
.topbar { background: #1f2937; color: #fff; padding: 8px 0; font-size: 14px; }
.topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { color: #fbbf24; font-weight: 700; font-size: 18px; }
.topbar-slogan { color: #d1d5db; font-size: 13px; }
.topbar-right { display: flex; gap: 16px; }
.topbar-right a { color: #d1d5db; font-size: 13px; }

/* === 主导航 === */
.mainnav { background: #fff; border-bottom: 1px solid #e5e7eb; }
.mainnav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; padding: 0 16px; height: 48px; }
.mainnav-left, .mainnav-mid, .mainnav-right { display: flex; gap: 4px; }
.mainnav-mid { margin: 0 auto; }
.mainnav-right { margin-left: auto; }
.mainnav-item { padding: 12px 16px; color: #374151; font-size: 14px; border-bottom: 2px solid transparent; }
.mainnav-item:hover { background: #f3f4f6; text-decoration: none; }
.mainnav-item.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }

/* === 搜索栏 === */
.searchbar { background: #fff; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.searchbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; justify-content: center; }
.search-form { display: flex; width: 100%; max-width: 600px; }
.search-input { flex: 1; padding: 8px 12px; border: 1px solid #d1d5db; border-right: 0; font-size: 14px; }
.search-btn { padding: 8px 20px; background: #2563eb; color: #fff; border: 0; cursor: pointer; }

/* === 主体 === */
.main-content { max-width: 1200px; margin: 0 auto; padding: 16px; min-height: 60vh; }

/* === tabs === */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; background: #fff; padding: 8px; border-radius: 8px 8px 0 0; }
.tab { padding: 8px 16px; color: #374151; font-size: 14px; border-radius: 6px; }
.tab.active { background: #2563eb; color: #fff; }
.tab-count { font-size: 12px; margin-left: 4px; padding: 1px 6px; background: rgba(255,255,255,0.2); border-radius: 10px; }
.tab.active .tab-count { background: rgba(255,255,255,0.3); }

/* === 排序 === */
.sortbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #fff; padding: 8px 12px; border-bottom: 1px solid #e5e7eb; }
.sortbar-label { color: #6b7280; font-size: 13px; }
.sort-item { padding: 4px 12px; color: #374151; font-size: 13px; border-radius: 4px; }
.sort-item.active { background: #fef3c7; color: #92400e; font-weight: 600; }
.sort-item:hover { background: #f3f4f6; text-decoration: none; }

/* === 筛选 chips === */
.filterbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #fff; padding: 8px 12px; border-bottom: 1px solid #e5e7eb; }
.filterbar-label { color: #6b7280; font-size: 13px; }
.filter-chip { padding: 4px 10px; background: #f3f4f6; color: #374151; font-size: 12px; border-radius: 12px; }
.filter-chip:hover { background: #2563eb; color: #fff; text-decoration: none; }

/* === 表格 === */
.goods-table-wrap { background: #fff; border-radius: 0 0 8px 8px; overflow-x: auto; }
.goods-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.goods-table th, .goods-table td { padding: 8px; text-align: center; border-bottom: 1px solid #f3f4f6; }
.goods-table th { background: #f9fafb; color: #6b7280; font-weight: 600; white-space: nowrap; }
.goods-row { cursor: pointer; }
.goods-row:hover { background: #f0f9ff; }
.cell-img img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.cell-id { font-family: monospace; color: #6b7280; }
.cell-skin { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-price { color: #dc2626; font-weight: 700; }
.cell-beizhu { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6b7280; }
.cell-action { white-space: nowrap; }
.btn-rent { background: #dc2626; color: #fff; padding: 6px 16px; border: 0; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-rent:hover { background: #b91c1c; }
.no-img { color: #9ca3af; font-size: 11px; }
.empty { text-align: center; padding: 40px; color: #9ca3af; }

/* === 分页 === */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 16px; }
.page-link { padding: 6px 12px; background: #fff; border: 1px solid #d1d5db; border-radius: 4px; color: #374151; }
.page-link.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.page-link:hover { text-decoration: none; background: #f3f4f6; }
.page-link.active:hover { background: #1d4ed8; color: #fff; }

/* === 按钮 === */
.btn-primary { display: inline-block; padding: 10px 24px; background: #dc2626; color: #fff; border: 0; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-primary:hover { background: #b91c1c; text-decoration: none; }
.btn-secondary { display: inline-block; padding: 8px 16px; background: #fff; color: #374151; border: 1px solid #d1d5db; border-radius: 6px; }
.btn-secondary:hover { background: #f3f4f6; text-decoration: none; }
.btn-text { color: #2563eb; font-size: 13px; }

/* === 客服浮动按钮 === */
.chat-fab { position: fixed; right: 20px; bottom: 20px; padding: 12px 20px; background: #2563eb; color: #fff; border-radius: 24px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 6px; z-index: 999; }
.chat-fab:hover { background: #1d4ed8; }
.chat-fab-icon { font-size: 20px; }
.chat-fab-text { font-size: 14px; }
.chat-fab-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; background: #dc2626; color: #fff; border-radius: 10px; font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }

/* === 客服弹层 === */
.chat-modal { position: fixed; right: 20px; bottom: 80px; width: 360px; max-width: calc(100vw - 40px); max-height: 500px; background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.15); display: flex; flex-direction: column; z-index: 1000; }
.chat-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
.chat-modal-close { color: #6b7280; font-size: 24px; text-decoration: none; }
.chat-modal-body { flex: 1; overflow-y: auto; padding: 12px; min-height: 200px; max-height: 320px; }
.chat-modal-form { display: flex; border-top: 1px solid #e5e7eb; }
.chat-modal-input { flex: 1; padding: 10px 12px; border: 0; font-size: 14px; outline: 0; }
.chat-modal-send { padding: 10px 16px; background: #2563eb; color: #fff; border: 0; cursor: pointer; }

/* === 消息气泡 === */
.chat-msg { padding: 8px 12px; margin: 4px 0; border-radius: 8px; max-width: 80%; word-wrap: break-word; }
.chat-msg-system { background: #fef3c7; color: #92400e; font-size: 12px; text-align: center; margin: 0 auto; max-width: 100%; }
.chat-msg-guest { background: #2563eb; color: #fff; margin-left: auto; }
.chat-msg-staff { background: #f3f4f6; color: #222; }
.chat-msg-name { font-weight: 600; color: #2563eb; font-size: 12px; }

/* === 页脚 === */
.site-footer { background: #1f2937; color: #d1d5db; margin-top: 32px; padding: 32px 16px 16px; }
.site-footer-inner { max-width: 1200px; margin: 0 auto; }
.site-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.site-footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 14px; }
.site-footer-col a { display: block; color: #d1d5db; font-size: 13px; padding: 4px 0; }
.site-footer-col a:hover { color: #fff; }
.site-footer-col p { font-size: 13px; padding: 4px 0; }
.footer-en { color: #9ca3af; font-size: 12px; }
.site-footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid #374151; font-size: 12px; color: #9ca3af; margin-top: 24px; }
.footer-icp { margin-left: 12px; }

/* === 页面通用 === */
.page-content { background: #fff; padding: 24px; border-radius: 8px; }
.page-content h1 { font-size: 24px; margin-bottom: 16px; color: #1f2937; }
.page-content h2 { font-size: 18px; margin: 16px 0 8px; color: #374151; }
.page-block { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #e5e7eb; }
.page-block:last-child { border-bottom: 0; }
.page-block p { color: #4b5563; line-height: 1.8; }
.page-block ul { padding-left: 24px; color: #4b5563; }
.page-block li { padding: 4px 0; }

/* === 表单 === */
.login-form { max-width: 400px; margin: 0 auto; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #374151; margin-bottom: 4px; }
.form-group input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.form-group input:focus { outline: 0; border-color: #2563eb; }
.form-tip { text-align: center; margin-top: 16px; font-size: 13px; color: #6b7280; }
.alert { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* === 详情 === */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-imgs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.detail-img-item img { width: 100%; height: 200px; object-fit: cover; border-radius: 6px; }
.no-img-big { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #9ca3af; border-radius: 6px; }
.detail-title { font-size: 24px; margin-bottom: 4px; }
.detail-subtitle { color: #6b7280; font-size: 14px; margin-bottom: 16px; }
.detail-price { padding: 16px; background: #fef3c7; border-radius: 8px; margin-bottom: 16px; }
.price-label { color: #92400e; font-size: 13px; }
.price-value { color: #dc2626; font-size: 28px; font-weight: 700; margin: 0 8px; }
.price-deposit { color: #92400e; font-size: 13px; }
.detail-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-bottom: 16px; }
.detail-attr { display: flex; font-size: 13px; padding: 4px 0; }
.attr-label { color: #6b7280; width: 80px; }
.detail-beizhu { background: #f9fafb; padding: 12px; border-radius: 6px; margin-bottom: 16px; }
.detail-beizhu h3 { font-size: 14px; margin-bottom: 4px; }
.detail-beizhu p { color: #4b5563; font-size: 13px; }
.detail-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.detail-kefu { padding: 12px; background: #f9fafb; border-radius: 6px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.contact-mask { font-family: monospace; color: #6b7280; }

/* === 聊天页 === */
.chat-page, .room-chat-page { max-width: 600px; margin: 0 auto; background: #fff; padding: 24px; border-radius: 8px; }
.chat-window { display: flex; flex-direction: column; height: 500px; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f9fafb; }
.chat-form { display: flex; border-top: 1px solid #e5e7eb; background: #fff; }
.chat-input { flex: 1; padding: 12px; border: 0; font-size: 14px; outline: 0; }
.chat-send { padding: 12px 20px; background: #2563eb; color: #fff; border: 0; cursor: pointer; }
.chat-tip { text-align: center; font-size: 12px; color: #6b7280; margin-top: 12px; }

/* === 移动端 === */
@media (max-width: 768px) {
    .topbar-slogan { display: none; }
    .mainnav-mid { display: none; }
    .detail-grid { grid-template-columns: 1fr; }
    .chat-modal { right: 8px; bottom: 64px; width: calc(100vw - 16px); }
    .goods-table { font-size: 11px; }
    .cell-skin, .cell-beizhu { max-width: 100px; }
}
