/* 商品详情页样式 */
:root {
    --primary-color: #FF5252;
    --secondary-color: #333;
    --accent-color: #00B0FF;
    --light-color: #F5F5F5;
    --dark-color: #212121;
    --gray-color: #757575;
    --border-color: #E0E0E0;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 50px;
    background-color: var(--light-color);
    margin-bottom: 0;
}

.breadcrumb ul {
    display: flex;
    gap: 10px;
    align-items: center;
}

.breadcrumb li {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
}

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

/* 产品详情区域 */
.product-detail {
    padding: 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-detail-container {
    display: flex;
    gap: 50px;
}

/* 左侧图片区域 */
.product-gallery {
    width: 55%;
}

.gallery-main {
    position: relative;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: var(--transition);
}

.zoom-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.zoom-icon:hover {
    background-color: var(--primary-color);
    color: white;
}

.gallery-thumbs {
    display: flex;
    gap: 15px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}

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

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

/* 右侧详情区域 */
.product-info {
    width: 45%;
}

.product-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.product-code {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.star-rating {
    color: #FFC107;
    font-size: 1rem;
}

.rating-count {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.product-price {
    margin-bottom: 25px;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 1.2rem;
    color: var(--gray-color);
    text-decoration: line-through;
    margin-left: 10px;
}

.discount-label {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--success-color);
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 10px;
    font-weight: 500;
}

.product-description {
    margin-bottom: 25px;
    line-height: 1.7;
}

.product-availability {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.availability-status {
    font-weight: 600;
}

.in-stock {
    color: var(--success-color);
}

.low-stock {
    color: var(--warning-color);
}

.out-of-stock {
    color: var(--danger-color);
}

.product-colors {
    margin-bottom: 20px;
}

.option-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.color-options {
    display: flex;
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: var(--transition);
}

.color-option:hover, .color-option.selected {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--dark-color);
}

.product-sizes {
    margin-bottom: 20px;
}

.size-chart-link {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-left: 10px;
    cursor: pointer;
}

.size-chart-link:hover {
    text-decoration: underline;
}

.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-option {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    border-radius: 4px;
    padding: 0 10px;
}

.size-option:hover, .size-option.selected {
    background-color: var(--dark-color);
    color: white;
}

.size-option.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: line-through;
}

.product-quantity {
    margin-bottom: 25px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    width: 120px;
    height: 45px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.quantity-btn {
    width: 35px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
}

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

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

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.add-to-cart {
    flex-grow: 1;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-to-cart i {
    font-size: 1.1rem;
}

.buy-now {
    background-color: var(--dark-color);
}

.buy-now:hover {
    background-color: black;
}

.wishlist-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: none;
    cursor: pointer;
    transition: var(--transition);
}

.wishlist-btn:hover, .wishlist-btn.active {
    background-color: rgba(255, 82, 82, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.wishlist-btn.active i {
    color: var(--primary-color);
}

.product-meta {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.meta-label {
    font-weight: 600;
    width: 120px;
}

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

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.share-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

.facebook { background-color: #3b5998; }
.twitter { background-color: #1da1f2; }
.pinterest { background-color: #bd081c; }
.instagram { background-color: #c32aa3; }

/* 产品详细信息选项卡 */
.product-tabs {
    margin-top: 50px;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 30px 0;
}

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

.tab-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.tab-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.specifications {
    margin-top: 20px;
}

.spec-group {
    margin-bottom: 25px;
}

.spec-group h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr:nth-child(odd) {
    background-color: var(--light-color);
}

.spec-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.spec-table td:first-child {
    width: 40%;
    font-weight: 500;
}

/* 用户评价 */
.review-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.average-rating {
    text-align: center;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: 8px;
    min-width: 200px;
}

.rating-big {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.rating-count-big {
    color: var(--gray-color);
    font-size: 0.95rem;
}

.rating-bars {
    flex-grow: 1;
}

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

.rating-level {
    min-width: 60px;
    font-size: 0.9rem;
}

.rating-progress {
    flex-grow: 1;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin: 0 15px;
    position: relative;
}

.rating-fill {
    position: absolute;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.rating-percent {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.write-review {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.write-review i {
    color: var(--primary-color);
}

.review-filters {
    display: flex;
    gap: 15px;
}

.review-filter-label {
    font-size: 0.95rem;
    color: var(--gray-color);
}

.review-filter-select {
    padding: 8px 30px 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0 0l6 6 6-6z" fill="%23333"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

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

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

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

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

.reviewer-name {
    font-weight: 500;
}

.review-date {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-top: 3px;
}

.review-content {
    margin-bottom: 15px;
    line-height: 1.7;
}

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

.review-photo {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

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

.review-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 15px;
}

.helpful-text {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.helpful-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.helpful-btn:hover, .helpful-btn.active {
    background-color: var(--light-color);
}

.helpful-btn.active {
    color: var(--primary-color);
}

.review-report {
    font-size: 0.9rem;
    color: var(--gray-color);
    cursor: pointer;
}

.review-report:hover {
    color: var(--danger-color);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}

.page-item {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.page-item:hover, .page-item.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 相关产品 */
.related-products {
    margin-top: 60px;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.related-slider {
    position: relative;
}

.related-products .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.slider-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.arrow-prev, .arrow-next {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: var(--transition);
}

.arrow-prev {
    margin-left: -20px;
}

.arrow-next {
    margin-right: -20px;
}

.arrow-prev:hover, .arrow-next:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 响应式样式 */
@media (max-width: 1200px) {
    .product-detail {
        padding: 40px 30px;
    }
    
    .product-detail-container {
        gap: 30px;
    }
    
    .gallery-main img {
        height: 400px;
    }
    
    .related-products .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .product-detail-container {
        flex-direction: column;
    }
    
    .product-gallery, .product-info {
        width: 100%;
    }
    
    .product-tabs {
        margin-top: 30px;
    }
    
    .related-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .review-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .average-rating {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 30px 20px;
    }
    
    .gallery-main img {
        height: 350px;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .tab-btn {
        padding: 12px 15px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .wishlist-btn {
        width: 100%;
    }
    
    .review-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .breadcrumb {
        padding: 15px 20px;
    }
    
    .gallery-main img {
        height: 300px;
    }
    
    .gallery-thumbs {
        flex-wrap: wrap;
    }
    
    .related-products .product-grid {
        grid-template-columns: 1fr;
    }
    
    .reviewer-info {
        flex-direction: column;
        align-items: flex-start;
    }
} 