/**
 * B2B Product Catalog - 前台样式
 */

/* ========================================
   产品图集
   ======================================== */
.b2b-gallery {
    max-width: 600px;
}

.b2b-gallery-main {
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
}

.b2b-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.b2b-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.b2b-gallery-thumb-item {
    width: 72px;
    height: 72px;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.b2b-gallery-thumb-item:hover,
.b2b-gallery-thumb-item.active {
    border-color: #2271b1;
}

.b2b-gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   规格参数表
   ======================================== */
.b2b-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.b2b-specs-table tr {
    border-bottom: 1px solid #eee;
}

.b2b-specs-table tr:last-child {
    border-bottom: none;
}

.b2b-specs-table th,
.b2b-specs-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.b2b-spec-name {
    width: 35%;
    font-weight: 600;
    color: #333;
    background: #f9f9f9;
}

.b2b-spec-value {
    color: #555;
}

/* ========================================
   PDF 下载
   ======================================== */
.b2b-downloads-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.b2b-download-item {
    margin-bottom: 8px;
}

.b2b-download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    font-size: 14px;
}

.b2b-download-link:hover {
    background: #f0f6fc;
    border-color: #2271b1;
    color: #2271b1;
}

.b2b-download-icon {
    font-size: 18px;
}

.b2b-download-size {
    color: #999;
    font-size: 12px;
}

/* ========================================
   FAQ
   ======================================== */
.b2b-faq .b2b-faq-item {
    margin-bottom: 6px;
}

.b2b-faq-details {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.b2b-faq-question {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: #f9f9f9;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.b2b-faq-question:hover {
    background: #f0f6fc;
}

.b2b-faq-question::-webkit-details-marker {
    display: none;
}

.b2b-faq-question::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
    color: #999;
    transition: transform 0.2s;
}

.b2b-faq-details[open] .b2b-faq-question::after {
    content: '−';
}

.b2b-faq-answer {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    border-top: 1px solid #eee;
}

/* ========================================
   产品卡片网格
   ======================================== */
.b2b-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.b2b-product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}

.b2b-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.b2b-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.b2b-card-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.b2b-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.b2b-product-card:hover .b2b-card-image img {
    transform: scale(1.05);
}

.b2b-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 13px;
}

.b2b-card-info {
    padding: 12px;
}

.b2b-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #333;
    line-height: 1.4;
}

.b2b-card-model {
    font-size: 12px;
    color: #999;
}

/* ========================================
   产品变体
   ======================================== */
.b2b-variant-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.b2b-variant-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.b2b-variant-tab:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.b2b-variant-tab.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.b2b-variant-detail {
    display: none;
}

.b2b-variant-detail.active {
    display: block;
}

.b2b-variant-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.b2b-variant-image {
    width: 120px;
    flex-shrink: 0;
}

.b2b-variant-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #eee;
}

.b2b-variant-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.b2b-variant-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.b2b-variant-model {
    font-size: 14px;
    color: #666;
}

.b2b-variant-specs-table {
    margin-bottom: 12px;
}

.b2b-variant-download {
    margin-top: 10px;
}

/* ========================================
   产品视频
   ======================================== */
.b2b-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.b2b-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   询盘按钮
   ======================================== */
.b2b-inquiry-btn-wrap {
    margin: 16px 0;
}

.b2b-inquiry-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}

.b2b-inquiry-btn:hover {
    background: #135e96;
    color: #fff;
}

/* ========================================
   面包屑
   ======================================== */
.b2b-breadcrumb {
    padding: 10px 0;
    font-size: 13px;
}

.b2b-breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.b2b-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.b2b-breadcrumb-item a {
    color: #2271b1;
    text-decoration: none;
}

.b2b-breadcrumb-item a:hover {
    text-decoration: underline;
}

.b2b-breadcrumb-sep {
    color: #999;
    font-size: 11px;
}

/* ========================================
   产品状态标记（前台通用）
   ======================================== */
.b2b-status-active {
    color: #00a32a;
    font-weight: 600;
    font-size: 13px;
}

.b2b-status-discontinued {
    color: #d63638;
    font-weight: 600;
    font-size: 13px;
}

/* ========================================
   响应式
   ======================================== */
@media screen and (max-width: 768px) {
    .b2b-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .b2b-gallery {
        max-width: 100%;
    }

    .b2b-gallery-thumb-item {
        width: 56px;
        height: 56px;
    }

    .b2b-variant-info {
        flex-direction: column;
    }

    .b2b-variant-image {
        width: 100%;
        max-width: 200px;
    }

    .b2b-variant-selector {
        flex-direction: column;
    }

    .b2b-variant-tab {
        width: 100%;
        text-align: center;
    }

    .b2b-spec-name {
        width: 40%;
    }
}

@media screen and (max-width: 480px) {
    .b2b-product-grid {
        grid-template-columns: 1fr;
    }
}