/* 商品详情页面样式 */

.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
    color: var(--light-text);
}

.breadcrumb a {
    color: var(--light-text);
}

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

/* 商品详情区域 */
.product-detail {
    display: flex;
    margin-bottom: 50px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* 商品图片展示 */
.product-gallery {
    flex: 0 0 45%;
    padding: 30px;
    background-color: var(--secondary-color);
}

.main-image {
    text-align: center;
    margin-bottom: 20px;
}

.main-image img {
    max-height: 350px;
    max-width: 100%;
}

.thumbnail-list {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

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

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

/* 商品信息 */
.product-info {
    flex: 1;
    padding: 30px;
}

.product-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--light-text);
}

.rating {
    display: flex;
    align-items: center;
}

.rating i {
    color: #FFD700;
    margin-right: 2px;
}

.rating span {
    margin-left: 5px;
}

.product-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 20px;
}

.current-price {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 10px;
}

.original-price {
    font-size: 16px;
    color: var(--light-text);
    text-decoration: line-through;
    margin-right: 10px;
}

.discount {
    font-size: 14px;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
}

/* 店铺信息 */
.store-info {
    display: flex;
    flex-direction: column;
    padding: 15px;
    margin-bottom: 20px;
    background-color: var(--secondary-color);
    border-radius: 5px;
}

.store-name {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.store-name img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.store-badge {
    margin-left: 8px;
    font-size: 12px;
    background-color: #4CAF50;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
}

.store-stats {
    display: flex;
    font-size: 14px;
}

.stat-item {
    margin-right: 20px;
}

.stat-item .label {
    color: var(--light-text);
}

.stat-item .value {
    color: #FF5722;
    font-weight: 500;
}

/* 商品选项 */
.product-options {
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 15px;
}

.option-title {
    margin-bottom: 10px;
    font-weight: 500;
}

.option-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: var(--primary-color);
}

.option-item.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.color-option {
    display: flex;
    align-items: center;
}

.color-circle {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
}

/* 数量选择器 */
.quantity-selector {
    margin-bottom: 20px;
}

.quantity-control {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background-color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: var(--secondary-color);
}

.quantity-btn.decrease {
    border-radius: 4px 0 0 4px;
}

.quantity-btn.increase {
    border-radius: 0 4px 4px 0;
}

.quantity-input {
    width: 50px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
    outline: none;
}

.stock {
    margin-left: 15px;
    font-size: 14px;
    color: var(--light-text);
}

/* 商品服务 */
.product-services {
    display: flex;
    margin-bottom: 20px;
}

.service-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
    font-size: 14px;
}

.service-item i {
    color: #4CAF50;
    margin-right: 5px;
}

/* 商品操作按钮 */
.product-actions {
    display: flex;
    gap: 15px;
}

.add-to-cart-btn {
    padding: 10px 25px;
    font-size: 16px;
}

.buy-now-btn {
    padding: 10px 25px;
    font-size: 16px;
    background-color: #FF9800;
    color: white;
    border: none;
}

.buy-now-btn:hover {
    background-color: #F57C00;
    color: white;
}

.wishlist-btn {
    padding: 10px 15px;
    font-size: 16px;
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.wishlist-btn:hover {
    background-color: var(--secondary-color);
}

.wishlist-btn i {
    margin-right: 5px;
}

/* 商品详情选项卡 */
.product-detail-tabs {
    margin-bottom: 50px;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 25px;
    font-size: 16px;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    color: var(--light-text);
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 商品详情内容 */
.product-description h2,
.product-specifications h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.description-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.feature-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature {
    text-align: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature p {
    color: var(--light-text);
    font-size: 14px;
}

.product-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.product-images img {
    max-width: 100%;
    margin-bottom: 20px;
}

/* 规格参数 */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

.specs-table th,
.specs-table td {
    padding: 12px 15px;
    text-align: left;
}

.specs-table th {
    width: 150px;
    background-color: var(--secondary-color);
    font-weight: 500;
}

/* 用户评价 */
.reviews-summary {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.overall-rating {
    flex: 0 0 200px;
    text-align: center;
    padding-right: 30px;
    border-right: 1px solid var(--border-color);
}

.rating-score {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.rating-stars {
    font-size: 20px;
    color: #FFD700;
    margin-bottom: 10px;
}

.total-reviews {
    color: var(--light-text);
}

.rating-distribution {
    flex: 1;
    padding-left: 30px;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rating-label {
    width: 40px;
    margin-right: 10px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 10px;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
}

.rating-percentage {
    width: 40px;
    text-align: right;
}

.reviews-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 20px;
    background-color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover,
.filter-tag.active {
    background-color: var(--primary-color);
    color: white;
}

.sort-reviews {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.reviews-list {
    margin-bottom: 30px;
}

.review-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.reviewer-info {
    flex: 0 0 100px;
    text-align: center;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
}

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

.reviewer-name {
    font-size: 14px;
    color: var(--light-text);
}

.review-content {
    flex: 1;
}

.review-rating {
    font-size: 14px;
    color: #FFD700;
    margin-bottom: 10px;
}

.review-text {
    margin-bottom: 15px;
    line-height: 1.6;
}

.review-images {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.review-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.review-images img:hover {
    transform: scale(1.05);
}

.review-meta {
    font-size: 12px;
    color: var(--light-text);
    display: flex;
    justify-content: space-between;
}

.review-spec {
    margin-left: 10px;
}

/* 相关商品 */
.related-products {
    margin-bottom: 50px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: var(--primary-color);
}

.products-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .product-detail {
        flex-direction: column;
    }
    
    .product-gallery {
        padding-bottom: 0;
    }
    
    .reviews-summary {
        flex-direction: column;
    }
    
    .overall-rating {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .rating-distribution {
        padding-left: 0;
    }
    
    .products-slider {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .product-actions {
        flex-direction: column;
    }
    
    .review-item {
        flex-direction: column;
    }
    
    .reviewer-info {
        margin-bottom: 15px;
    }
    
    .products-slider {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 576px) {
    .product-price {
        flex-wrap: wrap;
    }
    
    .current-price {
        margin-bottom: 5px;
    }
    
    .reviews-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-tags {
        margin-bottom: 10px;
    }
    
    .review-meta {
        flex-direction: column;
    }
    
    .review-spec {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .products-slider {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
} 