/* ========================================
   PCB产品详情页样式 - fs.com风格
   ======================================== */

/* --- Hero区域 --- */
.pcb-detail-hero {
    padding: 40px 0 60px;
}

.pcb-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* --- 左侧图片画廊 --- */
.pcb-gallery {
    position: sticky;
    top: 100px;
}

.pcb-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid #e9ecef;
}

.pcb-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.15s ease;
}

.pcb-gallery-zoom {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s;
}

.pcb-gallery-main:hover .pcb-gallery-zoom {
    opacity: 1;
}

/* 缩略图条 */
.pcb-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
}

.pcb-gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.pcb-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.pcb-thumb {
    flex: 0 0 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f8f9fa;
    transition: border-color 0.2s, transform 0.2s;
}

.pcb-thumb:hover {
    border-color: #adb5bd;
    transform: translateY(-2px);
}

.pcb-thumb.active {
    border-color: #e63946;
}

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

/* --- 右侧产品信息 --- */
.pcb-info {
    padding-top: 10px;
}

.pcb-info-header {
    margin-bottom: 28px;
}

.pcb-category-badge {
    display: inline-block;
    background: #e63946;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.pcb-product-title {
    font-size: 26px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
    line-height: 1.3;
}

.pcb-product-summary {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.6;
}

/* --- SKU选择区 --- */
.pcb-sku-section {
    margin-bottom: 28px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.pcb-sku-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pcb-sku-title {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
}

.pcb-sku-count {
    font-size: 13px;
    color: #adb5bd;
}

.pcb-sku-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.pcb-sku-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pcb-sku-item:hover {
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pcb-sku-item.active {
    border-color: #e63946;
    background: #fff5f5;
}

.pcb-sku-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.pcb-sku-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pcb-sku-name {
    font-size: 12px;
    color: #495057;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 快速参数概览 --- */
.pcb-quick-specs {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.pcb-quick-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f3f5;
}

.pcb-quick-spec-item:nth-child(odd) {
    border-right: 1px solid #e9ecef;
}

.pcb-quick-spec-label {
    color: #868e96;
    font-weight: 500;
}

.pcb-quick-spec-value {
    color: #212529;
    font-weight: 600;
    text-align: right;
}

/* --- 操作按钮 --- */
.pcb-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.pcb-actions .btn {
    flex: 1;
}

/* --- 规格参数区 --- */
.pcb-specs-section {
    padding: 50px 0 80px;
    background: #fff;
}

.pcb-specs-header {
    margin-bottom: 30px;
}

.pcb-specs-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pcb-specs-header h2 i {
    color: #e63946;
}

.pcb-specs-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.pcb-spec-group {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #e9ecef;
}

.pcb-spec-group-title {
    font-size: 15px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e63946;
}

.pcb-spec-group-title i {
    color: #e63946;
    font-size: 14px;
}

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

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

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

.pcb-specs-table td {
    padding: 9px 0;
    font-size: 13px;
    line-height: 1.5;
}

.pcb-spec-label {
    color: #868e96;
    width: 45%;
    font-weight: 500;
}

.pcb-spec-value {
    color: #212529;
    font-weight: 600;
    text-align: right;
}

/* --- 灯箱 --- */
.pcb-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.pcb-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcb-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
}

.pcb-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcb-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.pcb-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.pcb-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

.pcb-lightbox-prev,
.pcb-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.pcb-lightbox-prev { left: 20px; }
.pcb-lightbox-next { right: 20px; }

.pcb-lightbox-prev:hover,
.pcb-lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.pcb-lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    z-index: 10;
}

/* --- 响应式 --- */
@media (max-width: 992px) {
    .pcb-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pcb-gallery {
        position: static;
    }

    .pcb-sku-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .pcb-specs-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .pcb-product-title {
        font-size: 20px;
    }

    .pcb-sku-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pcb-actions {
        flex-direction: column;
    }

    .pcb-quick-specs {
        grid-template-columns: 1fr;
    }

    .pcb-quick-spec-item:nth-child(odd) {
        border-right: none;
    }

    .pcb-specs-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
