/* ==========================================
   商家文章侧边栏样式
   ========================================== */

:root {
    --primary-color: #FF6A00;
    --primary-dark: #E55D00;
    --accent-color: #FFB800;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #E5E5E5;
    --bg-light: #F8F9FA;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(255, 106, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 12px;
    --transition: all 0.3s ease;
}

/* ==========================================
   侧边栏容器
   ========================================== */

.vc-author-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: fit-content;
}

.vc-sidebar-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.vc-sidebar-card:hover {
    box-shadow: var(--shadow-md);
}

.vc-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px;
}

.vc-sidebar-title svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.vc-sidebar-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 16px;
    transition: var(--transition);
}

.vc-sidebar-more:hover {
    gap: 10px;
    color: var(--primary-dark);
}

/* ==========================================
   1. 商家信息卡片
   ========================================== */

.vc-vendor-card {
    border: 2px solid var(--border-color);
}

.vc-vendor-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.vc-vendor-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light);
}

.vc-vendor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vc-vendor-info {
    flex: 1;
    min-width: 0;
}

.vc-vendor-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}

.vc-vendor-name a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.vc-vendor-name a:hover {
    color: var(--primary-color);
}

.vc-vendor-main-products {
    font-size: 13px;
    color: var(--text-light);
    margin: 6px 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vc-vendor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 184, 0, 0.1);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 184, 0, 0.3);
}

.vc-vendor-badge svg {
    fill: var(--accent-color);
}

.vc-vendor-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
    margin: 0 0 16px;
}

.vc-vendor-description {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.vc-vendor-description p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
    margin: 0;
}

.vc-vendor-desc-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-style: italic;
}

.vc-vendor-desc-empty svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* 店铺详细信息 */
.vc-vendor-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.vc-vendor-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-gray);
}

.vc-vendor-detail-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.vc-vendor-detail-item span {
    line-height: 1.4;
}

.vc-vendor-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.vc-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.vc-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

.vc-stat svg {
    color: var(--primary-color);
    flex-shrink: 0;
    display: none; /* 隐藏图标 */
}

.vc-stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.vc-stat-label {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 400;
}

.vc-vendor-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 1;
    max-height: 200px;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

/* 只在产品详情页应用隐藏效果 */
.vc-product-page .vc-vendor-actions {
    opacity: 0;
    max-height: 0;
}

.vc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.vc-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #FF8533);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 106, 0, 0.25);
}

.vc-btn-primary:hover {
    background: linear-gradient(135deg, #FF8533, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.vc-btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.vc-btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.vc-btn-block {
    width: 100%;
}

/* ==========================================
   2. 商家文章列表
   ========================================== */

.vc-author-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vc-author-post-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.vc-author-post-item:hover {
    background: var(--bg-light);
}

.vc-post-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light);
}

.vc-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.vc-author-post-item:hover .vc-post-thumb img {
    transform: scale(1.1);
}

.vc-post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vc-post-item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.vc-post-item-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vc-post-item-title a:hover {
    color: var(--primary-color);
}

.vc-post-item-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-light);
}

.vc-post-item-date svg {
    flex-shrink: 0;
}

/* ==========================================
   3. 商家产品网格
   ========================================== */

.vc-author-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.vc-product-mini-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.vc-product-mini-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.vc-product-mini-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-light);
}

.vc-product-mini-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.vc-product-mini-card:hover .vc-product-mini-image img {
    transform: scale(1.1);
}

.vc-product-mini-info {
    padding: 10px;
    background: white;
}

.vc-product-mini-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;
}

.vc-product-mini-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vc-product-mini-title a:hover {
    color: var(--primary-color);
}

.vc-product-mini-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ==========================================
   4. 询盘模态框
   ========================================== */

.vc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vc-modal.active {
    opacity: 1;
    visibility: visible;
}

.vc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.vc-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.vc-modal.active .vc-modal-content {
    transform: scale(1);
}

.vc-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-gray);
}

.vc-modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.vc-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.vc-modal-header svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.vc-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.vc-modal-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
    margin: 0 0 24px;
}

.vc-inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vc-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.vc-required {
    color: #EF4444;
}

.vc-form-group input,
.vc-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
    font-family: inherit;
}

.vc-form-group input:focus,
.vc-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
}

.vc-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.vc-inquiry-success {
    text-align: center;
    padding: 30px 20px;
}

.vc-inquiry-success svg {
    color: #10B981;
    margin-bottom: 16px;
}

.vc-inquiry-success h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.vc-inquiry-success p {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0;
}

/* ==========================================
   响应式设计
   ========================================== */

@media (max-width: 1200px) {
    .vc-author-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .vc-author-sidebar {
        order: -1;
        margin-bottom: 40px;
    }
    
    .vc-author-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .vc-sidebar-card {
        padding: 20px;
    }
    
    .vc-vendor-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .vc-vendor-avatar {
        width: 100px;
        height: 100px;
    }
    
    .vc-vendor-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 0;
        padding: 20px 0;
    }
    
    .vc-stat:nth-child(2n)::after {
        display: none;
    }
    
    .vc-stat:nth-child(1)::after,
    .vc-stat:nth-child(2)::after {
        display: block;
    }
    
    .vc-stat-number {
        font-size: 24px;
    }
    
    .vc-author-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 模态框响应式 */
    .vc-modal-content {
        width: 95%;
        padding: 24px;
        max-height: 95vh;
    }
    
    .vc-modal-header h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .vc-post-thumb {
        width: 60px;
        height: 60px;
    }
    
    .vc-post-item-title {
        font-size: 13px;
    }
    
    .vc-author-products-grid {
        grid-template-columns: 1fr;
    }
    
    /* 模态框小屏幕优化 */
    .vc-modal-content {
        padding: 20px;
    }
    
    .vc-modal-header {
        gap: 8px;
    }
    
    .vc-modal-header h3 {
        font-size: 18px;
    }
}


/* ==========================================
   作者信息卡片（用于非商家侧边栏）
   ========================================== */

.vc-author-info-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    /* margin-bottom: 24px; */
    /* border: 1px solid var(--border-color); */
    transition: var(--transition);
}

.vc-author-info-card:hover {
    box-shadow: var(--shadow-md);
}

/* 头像 + 名称 + 职位 */
.vc-author-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.vc-author-card-avatar {
    width: 90px; /* 从80px增大到90px */
    height: 90px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light);
}

.vc-author-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vc-author-card-top {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px; /* 从4px增加到6px */
}

.vc-author-card-name {
    font-size: 18px; /* 从16px增大到18px */
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.vc-author-card-name a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.vc-author-card-name a:hover {
    color: var(--primary-color);
}

.vc-author-card-position {
    font-size: 14px; /* 从13px增大到14px */
    color: var(--text-gray);
    margin: 0;
    line-height: 1.3;
}

/* 统计信息 */
.vc-author-card-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px; /* 从12px增加到16px */
    padding: 16px 0; /* 从12px增加到16px */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px; /* 从16px增加到18px */
    flex-wrap: wrap;
}

.vc-author-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* 从2px增加到4px */
}

.vc-author-stat-number {
    font-size: 18px; /* 从16px增大到18px */
    font-weight: 700;
    color: var(--primary-color);
}

.vc-author-stat-label {
    font-size: 13px; /* 从11px增大到13px */
    color: var(--text-gray);
}

.vc-author-stat-divider {
    color: var(--border-color);
    font-size: 16px; /* 从14px增大到16px */
}

/* 作者简介 */
.vc-author-card-bio-section {
    padding: 0;
}

.vc-author-card-bio {
    font-size: 15px; /* 从14px增大到15px */
    line-height: 1.7; /* 从1.6增加到1.7 */
    color: var(--text-gray);
    margin: 0;
    text-align: left;
}
