/* 商品详情页面样式 */
.product-detail-container {
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px 0;
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ff6b35;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
}

.breadcrumb .current {
    color: #ff6b35;
    font-weight: 500;
}

/* 商品主要信息 */
.product-main {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* 商品图片区域 */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 1;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.image-zoom:hover {
    background: rgba(0, 0, 0, 0.7);
}

.zoom-icon {
    color: white;
    font-size: 18px;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    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-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin: 0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 16px;
}

.star.filled {
    color: #ffc107;
}

.rating-score {
    font-weight: 600;
    color: #ff6b35;
}

.rating-count,
.sales-count {
    color: #666;
    font-size: 14px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: #ff6b35;
}

.original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.discount-tag {
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.product-features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.feature-icon {
    font-size: 16px;
}

/* 规格选择 */
.product-specs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.spec-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.spec-label {
    font-weight: 500;
    color: #333;
    min-width: 60px;
}

.spec-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.spec-option {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.spec-option:hover {
    border-color: #ff6b35;
}

.spec-option.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* 数量选择 */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quantity-label {
    font-weight: 500;
    color: #333;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-input {
    width: 60px;
    height: 35px;
    border: none;
    text-align: center;
    font-size: 14px;
    outline: none;
}

.stock-info {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
}

/* 属性选择样式 */
.attr-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.attr-option {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.attr-option:hover {
    border-color: #ff6b35;
}

.attr-option.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

/* 规格选择增强样式 */
.spec-option {
    position: relative;
    min-width: 80px;
    text-align: center;
}

.spec-option.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.spec-option.disabled:hover {
    border-color: #e0e0e0;
}

/* 购买按钮增强样式 */
.purchase-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart {
    background: #fff;
    color: #ff6b35;
    border: 2px solid #ff6b35;
}

.btn-add-cart:hover {
    background: #ff6b35;
    color: white;
}

.btn-buy-now {
    background: #ff6b35;
    color: white;
}

.btn-buy-now:hover {
    background: #e55a2b;
}

.btn-favorite {
    width: 58px;
    height: 58px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-favorite:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

/* 购买按钮 */
.purchase-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart {
    background: white;
    color: #ff6b35;
    border: 2px solid #ff6b35;
}

.btn-add-cart:hover {
    background: #ff6b35;
    color: white;
}

.btn-buy-now {
    background: #ff6b35;
    color: white;
}

.btn-buy-now:hover {
    background: #e55a2b;
}

.btn-favorite {
    width: 50px;
    height: 50px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    transition: all 0.3s ease;
}

.btn-favorite:hover {
    color: #ff6b35;
    border-color: #ff6b35;
}

/* 商品详情标签页 */
.product-tabs {
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: #ff6b35;
}

.tab-btn.active {
    color: #ff6b35;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff6b35;
}

.tab-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 商品详情内容 */
.detail-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.detail-images img {
    width: 100%;
    border-radius: 8px;
}

.detail-text h3 {
    color: #333;
    margin-bottom: 15px;
}

.detail-text ul {
    list-style: none;
    padding: 0;
}

.detail-text li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 20px;
}

.detail-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ff6b35;
    font-weight: bold;
}

/* 规格参数表格 */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.specs-table td:first-child {
    background: #f8f9fa;
    font-weight: 500;
    width: 150px;
}

/* 用户评价 */
.review-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.review-score {
    text-align: center;
}

.score {
    font-size: 48px;
    font-weight: 700;
    color: #ff6b35;
    display: block;
}

.total-reviews {
    color: #666;
    font-size: 14px;
}

.review-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-label {
    width: 30px;
    font-size: 14px;
    color: #666;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: #ffc107;
    transition: width 0.3s ease;
}

.stat-count {
    width: 30px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-name {
    font-weight: 500;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-date {
    color: #666;
    font-size: 14px;
}

.review-content {
    color: #666;
    line-height: 1.6;
}

/* 售后服务 */
.service-content h3 {
    color: #333;
    margin-bottom: 15px;
    margin-top: 30px;
}

.service-content h3:first-child {
    margin-top: 0;
}

.service-content ul {
    list-style: none;
    padding: 0;
}

.service-content li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 20px;
}

.service-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ff6b35;
    font-weight: bold;
}

/* 推荐商品 */
.recommended-products {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.recommended-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.recommended-products .product-item {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.recommended-products .product-item:hover {
    transform: translateY(-3px);
}

.recommended-products .product-image {
    height: 150px;
    overflow: hidden;
}

.recommended-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-products .product-info {
    padding: 15px;
}

.recommended-products .product-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommended-products .product-price {
    font-size: 16px;
    font-weight: 600;
    color: #ff6b35;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }

    .tab-nav {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 50%;
    }

    .review-summary {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .purchase-buttons {
        flex-direction: column;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 15px 0;
    }

    .tab-btn {
        flex: 1 1 100%;
        font-size: 14px;
        padding: 15px;
    }

    .current-price {
        font-size: 28px;
    }

    .product-title {
        font-size: 20px;
    }
}

