/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: #004499;
}

.breadcrumb span {
    color: #333;
}

/* 产品详情主容器 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 产品图片区域 */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    width: 100%;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid #eee;
    position: relative;
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.main-image:hover {
    transform: scale(1.05);
}

/* 缩略图 */
.thumbnail-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}

.thumbnail:hover {
    border-color: #0066cc;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.thumbnail.active {
    border-color: #0066cc;
    box-shadow: 0 0 8px rgba(0, 102, 204, 0.5);
}

/* 产品信息区域 */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 标签 */
.product-labels {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.label-parts {
    background: #ff6b35;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
}

.label-category {
    background: #17a2b8;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-block;
}

/* 兼容性框 */
.compatibility-box {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #4caf50;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.compatibility-box strong {
    color: #2e7d32;
    font-size: 15px;
}

/* 产品标题 */
.product-title {
    font-size: 24px;
    color: #333;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
}

/* 产品ID */
.product-id {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* 价格信息 */
.product-pricing {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.wholesale-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price-label {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.price-value {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
}

.converted-prices {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.price-usd {
    color: #e74c3c;
    font-weight: bold;
}

.price-rub {
    color: #000;
}

.retail-price {
    font-size: 14px;
    color: #999;
}

.strikethrough {
    text-decoration: line-through;
}

/* 评分 */
.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #f39c12;
}

.rating-text {
    font-size: 14px;
    color: #666;
}

/* 库存状态 */
.availability {
    font-size: 16px;
    color: #333;
    padding: 10px 0;
}

.in-stock {
    color: #27ae60;
    font-weight: bold;
}

/* 数量选择 */
.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0;
}

.quantity-selector label {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #f0f0f0;
    border-color: #0066cc;
    color: #0066cc;
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 80px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    padding: 0 5px;
}

.quantity-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
}

.quantity-unit {
    font-size: 14px;
    color: #666;
}

.quick-quantity {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.quick-quantity button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    color: #333;
}

.quick-quantity button:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 102, 204, 0.3);
}

/* 加入购物车按钮 */
.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 10px;
}

.add-to-cart-btn:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn i {
    font-size: 20px;
}

/* 操作按钮 */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.action-btn {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #666;
}

.action-btn:hover {
    background: #f0f0f0;
    border-color: #0066cc;
    color: #0066cc;
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 18px;
}

/* 产品描述 */
.product-description {
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-description h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.description-content {
    line-height: 1.8;
    color: #666;
    font-size: 15px;
}

/* 相关产品 */
.related-products {
    margin: 40px 0;
    padding: 20px 0;
}

.related-products h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

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

.related-product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    background: #fff;
}

.related-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.related-product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-product-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.1);
}

.related-product-info {
    padding: 12px;
}

.related-product-name {
    font-size: 13px;
    margin-bottom: 8px;
    min-height: 55px;
    max-height: 84px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    color: #0066cc;
    word-wrap: break-word;
}

.related-product-name:hover {
    text-decoration: underline;
}

.related-product-price {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.related-product-price .price-cny {
    color: #000;
    display: block;
    font-size: 13px;
}

.related-product-price .price-usd {
    color: #e74c3c;
    font-weight: bold;
    font-size: 14px;
}

.related-product-price .price-rub {
    color: #000;
    font-size: 13px;
}

.related-product-rating {
    color: #f39c12;
    font-size: 14px;
}

/* 图片灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    animation: fadeIn 0.3s;
}

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.lightbox-close:hover {
    color: #ff6b35;
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

#lightboxImage {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .price-value {
        font-size: 24px;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-quantity {
        justify-content: center;
    }
    
    .quick-quantity button {
        flex: 1;
        min-width: 60px;
    }
    
    .product-actions {
        justify-content: center;
    }
    
    .product-labels {
        justify-content: center;
    }
}