/* 商品详情页面样式 */

.main-content {
    padding: 20px 0 60px;
    background-color: #f5f5f5;
}

.product-detail {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 商品主要信息区域 */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px;
}

/* 商品图片区域 */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.main-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail.active {
    border-color: #ff6b35;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 商品信息区域 */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.badge-new {
    background-color: #28a745;
}

.badge-hot {
    background-color: #dc3545;
}

.badge-sale {
    background-color: #ffc107;
    color: #333;
}

.product-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
    margin: 0;
}

.product-subtitle {
    font-size: 16px;
    color: #666;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-stars {
    color: #ffc107;
    font-size: 18px;
}

.rating-text {
    font-weight: bold;
    color: #333;
}

.review-count {
    color: #666;
    font-size: 14px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.current-price {
    font-size: 32px;
    font-weight: bold;
    color: #ff6b35;
}

.original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.product-specs {
    display: grid;
    gap: 10px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.spec-item {
    display: flex;
    align-items: center;
}

.spec-item label {
    min-width: 80px;
    font-weight: bold;
    color: #555;
}

.spec-item span {
    color: #333;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quantity-selector label {
    font-weight: bold;
    color: #333;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #f8f9fa;
    color: #333;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.quantity-btn:hover {
    background-color: #e9ecef;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#quantity {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    outline: none;
}

.stock-info {
    color: #28a745;
    font-size: 14px;
}

.product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
}

.product-actions .btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background-color: #e55a2b;
}

.btn-outline {
    background-color: transparent;
    color: #ff6b35;
    border: 2px solid #ff6b35;
}

.btn-outline:hover {
    background-color: #ff6b35;
    color: white;
}

.product-access-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 10px;
    background-color: #f8f9fa;
    color: #555;
    font-size: 14px;
}

.access-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: bold;
    color: white;
}

.access-pill.purchased {
    background-color: #07c160;
}

.access-pill.locked {
    background-color: #ff6b35;
}

.product-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.service-icon {
    font-size: 16px;
}

/* 标签页样式 */
.product-tabs {
    border-top: 1px solid #eee;
}

.tab-nav {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 15px 25px;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover,
.tab-btn.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    background-color: white;
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.course-video-access {
    display: grid;
    gap: 20px;
}

.course-video-status {
    padding: 18px 20px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f7fff9 0%, #ffffff 100%);
    border: 1px solid #dff5e7;
    color: #333;
    line-height: 1.7;
}

.course-video-player {
    border-radius: 16px;
    overflow: hidden;
    background-color: #0f1720;
}

.course-video-shell {
    display: grid;
    gap: 0;
}

.course-video-shell video {
    width: 100%;
    display: block;
    max-height: 520px;
    background-color: #000;
}

.course-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background-color: #111827;
    color: white;
}

.course-video-meta h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.course-video-meta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.course-video-meta .btn {
    white-space: nowrap;
}

.locked-video-card {
    padding: 36px 24px;
    text-align: center;
    background: linear-gradient(180deg, #fff7f2 0%, #ffffff 100%);
    color: #555;
}

.locked-video-card h3 {
    margin: 0 0 10px;
    color: #333;
}

.locked-video-card p {
    margin: 0 0 18px;
    line-height: 1.7;
}

.course-lesson-list {
    display: grid;
    gap: 12px;
}

.lesson-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    background-color: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
}

.lesson-item:hover,
.lesson-item.active {
    border-color: #ff6b35;
    box-shadow: 0 12px 24px rgba(255, 107, 53, 0.08);
}

.lesson-item.active {
    background-color: #fff7f2;
}

.lesson-item strong {
    display: block;
    color: #333;
    margin-bottom: 4px;
}

.lesson-item span {
    color: #666;
    font-size: 14px;
}

/* 商品描述 */
.product-description h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.product-description p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 规格参数表格 */
.product-specs-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.product-specs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.product-specs-table td:first-child {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
    width: 150px;
}

/* 评价区域 */
.reviews-summary {
    margin-bottom: 30px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.rating-overview {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: center;
}

.overall-rating {
    text-align: center;
}

.rating-score {
    font-size: 48px;
    font-weight: bold;
    color: #ff6b35;
    display: block;
    margin-bottom: 10px;
}

.overall-rating .rating-stars {
    font-size: 24px;
    margin-bottom: 5px;
}

.rating-count {
    color: #666;
    font-size: 14px;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.rating-bar span:first-child {
    min-width: 30px;
    color: #666;
}

.rating-bar span:last-child {
    min-width: 40px;
    color: #666;
    text-align: right;
}

.bar {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background-color: #ffc107;
    transition: width 0.3s ease;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: white;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: bold;
    color: #333;
}

.review-date {
    color: #999;
    font-size: 14px;
}

.review-rating {
    color: #ffc107;
    margin-bottom: 10px;
}

.review-content {
    color: #666;
    line-height: 1.6;
}

/* 常见问题 */
.qa-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qa-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.qa-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.qa-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 相关推荐 */
.related-products {
    padding: 30px;
    border-top: 1px solid #eee;
}

.related-products h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-item {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.related-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-info {
    padding: 15px;
}

.related-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-price {
    color: #ff6b35;
    font-weight: bold;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-main {
        gap: 30px;
        padding: 20px;
    }
    
    .main-image img {
        height: 400px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .current-price {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .main-image img {
        height: 300px;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .current-price {
        font-size: 24px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        flex: none;
        width: 100%;
    }
    
    .tab-nav {
        overflow-x: auto;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .tab-content {
        padding: 20px;
    }

    .course-video-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rating-overview {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-services {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 0 40px;
    }
    
    .product-detail {
        margin: 0 -5px;
        border-radius: 0;
    }
    
    .product-main {
        padding: 15px;
    }
    
    .main-image img {
        height: 250px;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .current-price {
        font-size: 22px;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .product-access-notice {
        align-items: flex-start;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .related-item img {
        height: 120px;
    }
    
    .related-info {
        padding: 10px;
    }
    
    .related-title {
        font-size: 13px;
    }
    
    .related-price {
        font-size: 14px;
    }
} 
