/* 详情页面样式 */

/* 面包屑导航 */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #28a745;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1e7e34;
}

.breadcrumb .separator {
    color: #adb5bd;
}

.breadcrumb .current {
    color: #495057;
    font-weight: 500;
}

/* 详情页面布局 */
.detail-section {
    padding: 2rem 0;
    background: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

/* 主要内容区域 */
.detail-main {
    background: #fff;
}

/* 详情头部 */
.detail-header {
    margin-bottom: 2rem;
}

.detail-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.recommended {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.badge.category {
    background: #e3f2fd;
    color: #1976d2;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    color: #28a745;
}

/* 图片展示区域 */
.detail-gallery {
    margin-bottom: 2rem;
}

.main-image {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image:hover .image-overlay {
    opacity: 1;
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: white;
    transform: scale(1.1);
}

.thumbnail-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail.active {
    border-color: #28a745;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    transform: scale(1.05);
}

/* 项目描述 */
.detail-description {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.detail-description h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.detail-description h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.description-content p {
    line-height: 1.8;
    color: #495057;
    margin-bottom: 1rem;
}

.description-content ul {
    list-style: none;
    padding: 0;
}

.description-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    line-height: 1.6;
}

.description-content li:last-child {
    border-bottom: none;
}

.description-content li strong {
    color: #28a745;
    font-weight: 600;
}

/* 项目案例 */
.detail-cases {
    margin-bottom: 2rem;
}

.detail-cases h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.case-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.case-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.case-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.case-info {
    padding: 1rem;
}

.case-info h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.case-info p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 评价系统 */
.detail-reviews {
    margin-bottom: 2rem;
}

.detail-reviews h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.reviews-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.rating-overview {
    text-align: center;
}

.rating-score {
    font-size: 3rem;
    font-weight: 700;
    color: #28a745;
    line-height: 1;
}

.rating-stars {
    color: #ffc107;
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.rating-count {
    color: #6c757d;
    font-size: 0.9rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item {
    padding: 1.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-details {
    flex: 1;
}

.reviewer-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.review-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.review-rating {
    color: #ffc107;
}

.review-content p {
    line-height: 1.7;
    color: #495057;
}

/* 侧边栏 */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 价格卡片 */
.price-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
}

.price-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.price-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
}

.price-note {
    color: #6c757d;
    font-size: 0.8rem;
}

.price-features {
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: #495057;
    font-size: 0.9rem;
}

.feature-item i {
    color: #28a745;
    font-size: 0.8rem;
}

.price-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-contact {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-favorite {
    background: white;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-favorite:hover {
    background: #f8f9fa;
    border-color: #28a745;
    color: #28a745;
}

.btn-favorite.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* 发布者卡片 */
.publisher-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.publisher-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.publisher-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.publisher-info {
    flex: 1;
}

.publisher-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.publisher-title {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.publisher-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-text {
    color: #6c757d;
    font-size: 0.8rem;
}

.publisher-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.8rem;
}

.publisher-description {
    margin-bottom: 1.5rem;
}

.publisher-description p {
    color: #495057;
    line-height: 1.6;
    font-size: 0.9rem;
}

.contact-info {
    margin-bottom: 1.5rem;
}

.contact-info h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #495057;
    font-size: 0.9rem;
}

.contact-item i {
    color: #28a745;
    width: 16px;
    text-align: center;
}

.publisher-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-message {
    flex: 1;
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-message:hover {
    background: #1e7e34;
}

.btn-follow {
    background: white;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-follow:hover {
    background: #f8f9fa;
    border-color: #28a745;
    color: #28a745;
}

/* 相关推荐 */
.related-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.related-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.related-item:hover {
    background: #f8f9fa;
}

.related-item img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-info {
    flex: 1;
}

.related-info h4 {
    margin-bottom: 0.25rem;
}

.related-info h4 a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.related-info h4 a:hover {
    color: #28a745;
}

.related-price {
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 图片预览模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    opacity: 0.7;
}

#modalImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .detail-sidebar {
        order: -1;
    }
    
    .price-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 1.5rem;
    }
    
    .detail-meta {
        gap: 1rem;
    }
    
    .main-image img {
        height: 250px;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .reviews-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .publisher-header {
        flex-direction: column;
        text-align: center;
    }
    
    .publisher-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .publisher-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .detail-section {
        padding: 1rem 0;
    }
    
    .detail-description,
    .price-card,
    .publisher-card,
    .related-card {
        padding: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .modal-content {
        padding: 10px;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}