/* 配件详情弹窗样式 */
.part-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.part-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.part-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.part-detail-modal.active .part-detail-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.part-detail-content {
    position: relative;
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.part-detail-content.show {
    transform: translateY(calc(100% - 66.666%)); /* 滑动到页面的3分之2处 */
}

.part-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e6eb;
    background: #fff;
    flex-shrink: 0;
}

.part-detail-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d2129;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 16px;
}

.part-detail-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f2f3f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #86909c;
    transition: all 0.2s;
    flex-shrink: 0;
}

.part-detail-close:hover {
    background: #e5e6eb;
    color: #1d2129;
    transform: rotate(90deg);
}

.part-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.part-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #86909c;
}

.loading-spinner {
    font-size: 32px;
    margin-bottom: 12px;
    color: #165dff;
}

/* 图片轮播样式 */
.part-detail-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f7f8fa;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    display: flex;
}
    position: relative;
.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    display: flex;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #86909c;
}

.carousel-placeholder i {
    font-size: 48px;
    margin-bottom: 8px;
    color: #c9cdd4;
}

.carousel-placeholder p {
    font-size: 14px;
    margin: 0;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1d2129;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-indicator.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* 价格信息样式 */
.part-detail-price {
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e6eb;
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: flex-start;
}

#part-detail-purchase-link {
    margin-left: auto;
}

.price-label {
    font-size: 14px;
    color: #4e5969;
    font-weight: 500;
}

.price-value {
    font-size: 24px;
    color: #e02020;
    font-weight: 700;
}

#part-detail-purchase-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    color: #165dff;
    text-decoration: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: none;
}

#part-detail-purchase-link:hover {
    color: #0e4acc;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

#part-detail-purchase-link i {
    font-size: 16px;
}

/* 规格参数样式 */
.part-detail-specs {
    padding: 20px 24px 250px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e6eb;
}

.part-detail-specs h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.part-detail-specs h4::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #165dff;
    border-radius: 2px;
}

.specs-table-container {
    overflow-x: auto;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.specs-table tr {
    border-bottom: 1px solid #f2f3f5;
}

.specs-table tr:last-child {
    border-bottom: none;
}

.spec-key {
    width: 40%;
    padding: 10px 12px;
    background: #f7f8fa;
    color: #4e5969;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.spec-value {
    width: 60%;
    padding: 10px 12px;
    color: #1d2129;
    text-align: left;
    word-break: break-word;
}

.no-specs {
    text-align: center;
    padding: 40px 20px;
    color: #86909c;
    font-size: 14px;
}

.no-specs i {
    font-size: 32px;
    margin-bottom: 8px;
    color: #c9cdd4;
}

/* 购买链接样式 */
.part-detail-purchase {
    padding: 20px 24px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.part-detail-purchase-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    color: #165dff;
    text-decoration: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: none;
}

.part-detail-purchase-link:hover {
    color: #0e4acc;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

.part-detail-purchase-link i {
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .part-detail-content {
        max-height: 85vh;
    }
    
    .part-detail-content.show {
        transform: translateY(calc(100% - 75%)); /* 在移动端稍微高一点 */
    }
    
    .part-detail-header {
        padding: 16px 20px;
    }
    
    .part-detail-header h3 {
        font-size: 16px;
    }
    
    .part-detail-close {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .part-detail-carousel {
        height: 180px;
    }
    
    .part-detail-price {
        padding: 14px 20px;
    }
    
    .price-value {
        font-size: 20px;
    }
    
    .part-detail-specs {
        padding: 16px 20px 250px 20px;
    }
    
    .part-detail-specs h4 {
        font-size: 15px;
    }
    
    .specs-table {
        font-size: 13px;
    }
    
    .spec-key,
    .spec-value {
        padding: 8px 10px;
    }
    
    .part-detail-purchase {
        padding: 16px 20px;
    }
    
    .part-detail-purchase-link {
        width: 100%;
        padding: 0;
        font-size: 15px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .carousel-indicator {
        width: 6px;
        height: 6px;
    }
    
    .carousel-indicator.active {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .part-detail-content {
        max-height: 90vh;
    }
    
    .part-detail-content.show {
        transform: translateY(calc(100% - 80%)); /* 在小屏幕上更高一点 */
    }
    
    .part-detail-header h3 {
        font-size: 14px;
    }
    
    .part-detail-carousel {
        height: 150px;
    }
    
    .price-value {
        font-size: 18px;
    }
    
    .specs-table {
        font-size: 12px;
    }
    
    .part-detail-purchase-link {
        padding: 0;
        font-size: 14px;
    }
}
