/**
 * B2B网站自定义样式
 * 参考gys.cn的专业B2B风格
 */

:root {
    --primary-color: #1890ff;
    --secondary-color: #52c41a;
    --danger-color: #ff4d4f;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e8e8e8;
    --bg-light: #f5f5f5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* 顶部信息栏 */
.top-bar {
    font-size: 14px;
}

.top-bar a {
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* 导航栏 */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* 分类导航 */
.category-nav {
    font-size: 14px;
}

.category-nav .nav-link {
    color: var(--text-color);
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.category-nav .nav-link:hover,
.category-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 400px);
    padding: 2rem 0;
}

/* 产品卡片 */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-card-img {
    width: 100%;
    border-radius: 8px 8px 0 0;
    background-color: var(--bg-light);
}

.product-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.product-card-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--danger-color);
    margin-bottom: 0.5rem;
}

.product-card-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 公司卡片 */
.company-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
    height: 100%;
}

.company-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.company-logo {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    flex-shrink: 0;
}

.company-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.company-intro {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.company-info {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Banner轮播 */
.banner-carousel {
    margin-bottom: 2rem;
}

.banner-content {
    min-height: 300px;
}

/* 分类展示 */
.category-section {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.category-more {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.category-more:hover {
    text-decoration: underline;
}

/* 热门搜索 */
.hot-search {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hot-search-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hot-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hot-search-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.hot-search-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 分页 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

/* 侧边栏 */
.sidebar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-list a:hover {
    color: var(--primary-color);
}

/* 产品详情页 */
.product-detail {
    background: white;
    border-radius: 8px;
    /* padding: 2rem; */
    margin-bottom: 2rem;
}

.product-images {
    margin-bottom: 2rem;
}

.product-main-image {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary-color);
}

.product-info h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.product-meta {
    margin-bottom: 1.5rem;
}

.product-meta-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
}

.product-meta-label {
    width: 100px;
    color: var(--text-light);
    font-weight: 500;
}

.product-meta-value {
    flex: 1;
    color: var(--text-color);
}

.product-description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Footer链接样式 */
.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    transition: all 0.3s;
    display: inline-block;
}

/* 广告位通用样式 */
.ad-slot {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
}

/* Banner 通栏（左侧内容区） */
.ad-banner {
    text-align: center;
    overflow: hidden;
}

/* 霸屏样式（备用） */
.ad-dominant {
    width: 100%;
    min-height: 240px;
    background: var(--bg-light);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

/* 竖版信息流（备用） */
.ad-vertical-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 橱窗信息流（右侧栏） */
.ad-showcase {
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    background: #fff;
}

.footer-links a:hover {
    color: #fff !important;
    padding-left: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .category-nav .nav-pills {
        flex-wrap: wrap;
    }
    
    .banner-content {
        min-height: 200px !important;
    }
    
    .product-card-img {
        height: 150px !important;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .top-bar {
        font-size: 12px;
    }
    
    .top-bar .col-md-6 {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }
    
    .company-card {
        padding: 1rem;
    }
    
    .product-detail {
        padding: 1rem;
    }
}

/* 资讯卡片 */
.news-card {
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-item {
    transition: all 0.3s;
}

.news-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

/* 工具类 */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

/* ============================================
   新增功能模块样式
   ============================================ */

/* 认证弹窗样式 */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal-container {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

/* 简化版注册弹窗 */
.auth-modal-simple {
    max-width: 480px;
}

.auth-modal-simple .auth-modal-body {
    padding: 2rem 2.5rem;
}

.auth-modal-simple .form-control-lg,
.auth-modal-simple .form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.auth-modal-simple .register-icon {
    animation: bounceIn 0.6s;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

.auth-modal-close:hover {
    color: var(--text-color);
}

.auth-modal-close.text-white:hover {
    color: #fff !important;
    opacity: 0.8;
}

.auth-modal-body {
    padding: 2rem;
}

.auth-benefits {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pending-info {
    background: var(--bg-light);
    border-radius: 8px;
}

/* 采购需求大厅样式 */
.purchase-hall {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.purchase-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    background: white;
}

.purchase-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.purchase-item.urgent {
    border-left: 4px solid var(--danger-color);
}

.purchase-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.purchase-badge.urgent {
    background: #fff1f0;
    color: var(--danger-color);
}

/* 商机信息卡片 */
.opportunity-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    background: white;
    height: 100%;
}

.opportunity-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.opportunity-card.hot {
    border-left: 4px solid #ff9800;
}

.opportunity-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--danger-color);
}

/* 供应商评级卡片 */
.supplier-rating-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
}

.supplier-rating-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.supplier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.supplier-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
}

.supplier-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #666;
}

.supplier-badge.certified {
    background: linear-gradient(135deg, #17a2b8, #5bc0de);
    color: white;
}

.certification-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.certification-tag {
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-color);
}

/* 行业报告卡片 */
.report-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
}

.report-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.report-card.hot::before {
    content: "HOT";
    position: absolute;
    top: -8px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.report-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 询价中心样式 */
.inquiry-center {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.inquiry-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.inquiry-feature {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.inquiry-feature:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.inquiry-feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 产品对比按钮 */
.compare-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.compare-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 悬浮按钮样式 */
.floating-chat,
.floating-service {
    position: fixed;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s;
}

.floating-chat {
    bottom: 100px;
}

.floating-service {
    bottom: 30px;
}

.floating-chat-btn,
.floating-service-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    transition: all 0.3s;
    position: relative;
}

.floating-chat-btn:hover,
.floating-service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.6);
}

.floating-chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.floating-chat-text,
.floating-service-text {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-color);
    font-weight: 500;
}

/* 功能按钮组 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    min-width: 150px;
}

/* 相关商机列表 */
.related-opportunities {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
}

/* 买家还看了 */
.buyers-viewed {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.buyers-viewed-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.buyers-viewed-item:last-child {
    border-bottom: none;
}

.buyers-viewed-item:hover {
    background: var(--bg-light);
    padding-left: 0.5rem;
}

.buyers-viewed-img {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 认证信息展示 */
.certification-info {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .auth-modal-container {
        max-width: 95%;
        margin: 1rem;
    }
    
    .auth-modal-body {
        padding: 1rem;
    }
    
    .auth-modal-simple {
        max-width: 95%;
    }
    
    .auth-modal-simple .auth-modal-body {
        padding: 1.5rem;
    }
    
    .auth-modal-simple .register-icon i {
        font-size: 2.5rem !important;
    }
    
    .inquiry-features {
        flex-direction: column;
    }
    
    .floating-chat,
    .floating-service {
        right: 10px;
    }
    
    .floating-chat {
        bottom: 80px;
    }
    
    .floating-chat-btn,
    .floating-service-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .purchase-item,
    .opportunity-card,
    .supplier-rating-card,
    .report-card {
        padding: 1rem;
    }
}

