/* ============================================================
   FitX — 整机（Machine）前端模板样式
   file: template-product/machine/machine.css
   ============================================================ */

/* --- CSS 变量 --- */
:root {
    --mpp-brand: #c8102e;
    --mpp-brand-dark: #a00d24;
    --mpp-brand-light: #fde8eb;
    --mpp-text: #1a1a1a;
    --mpp-text-secondary: #666;
    --mpp-text-muted: #888;
    --mpp-border: #e5e5e5;
    --mpp-border-light: #f0f0f0;
    --mpp-bg: #fff;
    --mpp-bg-alt: #f8f9fa;
    --mpp-bg-soft: #f5f5f5;
    --mpp-success: #00a32a;
    --mpp-warning: #dba617;
    --mpp-danger: #d63638;
    --mpp-radius: 8px;
    --mpp-radius-lg: 12px;
    --mpp-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --mpp-shadow: 0 4px 16px rgba(0,0,0,0.08);
    --mpp-max-width: 1400px;
    --mpp-sidebar-w: 420px;
    --mpp-gap: 24px;
}

/* --- 重置 --- */
.mpp-container * {
    box-sizing: border-box;
}
.mpp-container {
    max-width: var(--mpp-max-width);
    margin: 0 auto;
    padding: 0 var(--mpp-gap);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--mpp-text);
}

/* --- 面包屑 --- */
.mpp-breadcrumb {
    padding: 20px 0;
    font-size: 13px;
    color: var(--mpp-text-muted);
}
.mpp-breadcrumb a {
    color: var(--mpp-text-secondary);
    text-decoration: none;
}
.mpp-breadcrumb a:hover {
    color: var(--mpp-brand);
}
.mpp-breadcrumb__sep {
    margin: 0 8px;
    color: var(--mpp-border);
}
.mpp-breadcrumb__current {
    color: var(--mpp-text);
    font-weight: 500;
}

/* --- 移动端标题+标签（宽屏隐藏） --- */
.mpp-mobile-title {
    display: none;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mpp-border-light);
}
.mpp-mobile-title__heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--mpp-text);
    margin: 0;
    line-height: 1.3;
}

/* --- 标题区 --- */
.mpp-title-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 28px;
    gap: 20px;
}

.mmp-title-row-cat{
    color: var(--mpp-brand);
    font-size: 12px;
    font-weight: 600;
}

.mpp-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
}
.mpp-model {
    font-size: 14px;
    color: var(--mpp-text-secondary);
    margin-bottom: 12px;
}
.mpp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mpp-tag {
    display: inline-flex;
    padding: 5px 12px;
    background: var(--mpp-brand-light);
    color: var(--mpp-brand);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- 主布局 --- */
.mpp-layout {
    display: flex;
    gap: var(--mpp-gap);
    align-items: flex-start;
    padding-bottom: 64px;
}
.mpp-main {
    flex: 1;
    min-width: 0;
}
.mpp-sidebar {
    flex: 0 0 var(--mpp-sidebar-w);
    width: var(--mpp-sidebar-w);
    position: sticky;
    top: 84px;
}

/* --- 卡片通用 --- */
.mpp-card {
    background: var(--mpp-bg);
    border: 1px solid var(--mpp-border);
    border-radius: var(--mpp-radius-lg);
    padding: 24px;
    margin-bottom: var(--mpp-gap);
    box-shadow: var(--mpp-shadow-sm);
}
.mpp-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--mpp-border-light);
}

/* --- Gallery --- */
.mpp-gallery-stage {
    position: relative;
    background: var(--mpp-bg-soft);
    border-radius: var(--mpp-radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    margin-bottom: 12px;
    border: 1px solid var(--mpp-border-light);
}
.mpp-gallery-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
}
.mpp-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}
.mpp-gallery-thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border: 2px solid var(--mpp-border);
    border-radius: var(--mpp-radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--mpp-bg-soft);
    transition: border-color 0.2s;
}
.mpp-gallery-thumb.is-active,
.mpp-gallery-thumb:hover {
    border-color: var(--mpp-brand);
}
.mpp-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Video --- */
.mpp-video-player {
    background: #000;
    border-radius: var(--mpp-radius-lg);
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 12px;
}
.mpp-video-player video,
.mpp-video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
}
.mpp-video-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.mpp-video-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--mpp-border);
    border-radius: var(--mpp-radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.mpp-video-item.is-active,
.mpp-video-item:hover {
    border-color: var(--mpp-brand);
    background: var(--mpp-brand-light);
    color: var(--mpp-brand);
}

/* --- Product Summary (mobile only on desktop) --- */
.mpp-summary {
    display: none;
}
.mpp-sidebar-summary {
    display: block;
}
.mpp-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.mpp-summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    padding: 10px 12px 10px 14px;
    background: var(--mpp-bg-alt);
    border: 1px solid var(--mpp-border-light);
    border-left: 3px solid var(--mpp-brand);
    border-radius: 0 var(--mpp-radius) var(--mpp-radius) 0;
}
.mpp-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--mpp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.mpp-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--mpp-text);
}
.mpp-summary-value a {
    color: var(--mpp-brand);
    text-decoration: none;
}
.mpp-summary-value a:hover {
    text-decoration: underline;
}

/* --- Specifications --- */
.mpp-specs-wrap {
    max-height: 420px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s;
}
.mpp-specs-wrap.is-expanded {
    max-height: none;
}
.mpp-specs-wrap:not(.is-expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.95));
}
.mpp-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.mpp-specs-table th,
.mpp-specs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--mpp-border-light);
    vertical-align: top;
}
.mpp-specs-table th {
    width: 38%;
    background: var(--mpp-bg-alt);
    font-weight: 600;
    color: var(--mpp-text-secondary);
    border-right: 1px solid var(--mpp-border-light);
}
.mpp-specs-unit {
    font-size: 12px;
    color: var(--mpp-text-muted);
    margin-left: 6px;
}
.mpp-specs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 16px;
    background: var(--mpp-bg-alt);
    border: 1px solid var(--mpp-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.mpp-specs-toggle:hover {
    background: var(--mpp-brand-light);
    border-color: var(--mpp-brand);
    color: var(--mpp-brand);
}

/* --- Customization Options --- */
.mpp-customization-group {
    margin-bottom: 20px;
}
.mpp-customization-group:last-child {
    margin-bottom: 0;
}
.mpp-customization-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--mpp-text-secondary);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mpp-border-light);
}
.mpp-customization-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mpp-customization-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--mpp-bg-alt);
    border: 1px solid var(--mpp-border-light);
    border-radius: 100px;
    font-size: 13px;
}
.mpp-customization-check {
    color: var(--mpp-success);
    font-weight: 700;
}

/* --- Certifications --- */
.mpp-certs-table-wrap {
    overflow-x: auto;
}
.mpp-certs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.mpp-certs-table th,
.mpp-certs-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--mpp-border-light);
    vertical-align: middle;
}
.mpp-certs-table th {
    background: var(--mpp-bg-alt);
    font-weight: 600;
    color: var(--mpp-text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mpp-cert-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
}
.mpp-cert-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.mpp-cert-status--valid {
    background: #e6f4ea;
    color: var(--mpp-success);
}
.mpp-cert-status--valid::before {
    background: var(--mpp-success);
}
.mpp-cert-status--expiring {
    background: #fff8e6;
    color: #9a6c00;
}
.mpp-cert-status--expiring::before {
    background: var(--mpp-warning);
}
.mpp-cert-status--expired {
    background: #fde8eb;
    color: var(--mpp-danger);
}
.mpp-cert-status--expired::before {
    background: var(--mpp-danger);
}

/* --- Documents --- */
.mpp-docs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mpp-doc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--mpp-bg-alt);
    border: 1px solid var(--mpp-border-light);
    border-radius: var(--mpp-radius);
    transition: border-color 0.2s;
}
.mpp-doc-item:hover {
    border-color: var(--mpp-brand);
}
.mpp-doc-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.mpp-doc-info {
    flex: 1;
    min-width: 0;
}
.mpp-doc-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}
.mpp-doc-meta {
    font-size: 12px;
    color: var(--mpp-text-muted);
}
.mpp-doc-meta span {
    margin-right: 4px;
}
.mpp-doc-download {
    flex-shrink: 0;
    padding: 6px 14px;
    background: var(--mpp-brand);
    color: #fff;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.mpp-doc-download:hover {
    background: var(--mpp-brand-dark);
}

/* --- Q&A --- */
.mpp-qa-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mpp-qa-item {
    border: 1px solid var(--mpp-border-light);
    border-radius: var(--mpp-radius);
    overflow: hidden;
}
.mpp-qa-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: var(--mpp-bg-alt);
    border: none;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.mpp-qa-question:hover {
    background: var(--mpp-border-light);
}
.mpp-qa-toggle {
    transition: transform 0.2s;
}
.mpp-qa-item.is-open .mpp-qa-toggle {
    transform: rotate(180deg);
}
.mpp-qa-answer {
    display: none;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    border-top: 1px solid var(--mpp-border-light);
}
.mpp-qa-item.is-open .mpp-qa-answer {
    display: block;
}

/* --- Description --- */
.mpp-description-content {
    font-size: 15px;
    line-height: 1.8;
}
.mpp-description-content img {
    max-width: 100%;
    height: auto;
}

/* --- 侧栏通用 --- */
.mpp-sidebar-card {
    background: var(--mpp-bg);
    border: 1px solid var(--mpp-border);
    border-radius: var(--mpp-radius-lg);
    padding: 20px;
    margin-bottom: var(--mpp-gap);
    box-shadow: var(--mpp-shadow-sm);
}
.mpp-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mpp-border-light);
}

/* --- 侧栏：Product Summary --- */
.mpp-sidebar-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.mpp-sidebar-summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    padding: 10px 12px 10px 14px;
    background: var(--mpp-bg-alt);
    border: 1px solid var(--mpp-border-light);
    border-left: 3px solid var(--mpp-brand);
    border-radius: 0 var(--mpp-radius) var(--mpp-radius) 0;
    transition: border-color 0.2s;
}
.mpp-sidebar-summary-item:hover {
    border-left-color: var(--mpp-brand-dark);
}
.mpp-sidebar-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--mpp-text);
}
.mpp-sidebar-value a {
    color: var(--mpp-brand);
    text-decoration: none;
}
.mpp-sidebar-value a:hover {
    text-decoration: underline;
}
.mpp-sidebar-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--mpp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- Standalone items (Manufacturer / Origin) --- */
.mpp-standalone-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-top: 10px;
    background: var(--mpp-bg-alt);
    border: 1px solid var(--mpp-border-light);
    border-radius: var(--mpp-radius);
    transition: all 0.2s;
}
.mpp-standalone-item:hover {
    border-color: var(--mpp-brand);
    background: var(--mpp-brand-light);
}
.mpp-standalone-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
}
.mpp-standalone-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--mpp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.mpp-standalone-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--mpp-text);
    margin-left: auto;
    text-align: right;
}
.mpp-standalone-value a {
    color: var(--mpp-brand);
    text-decoration: none;
}
.mpp-standalone-value a:hover {
    text-decoration: underline;
}

/* --- 侧栏：Manufacturer --- */
.mpp-sidebar-mfr-inner {
    text-align: center;
}
.mpp-sidebar-mfr-logo {
    width: 120px;
    height: 60px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mpp-bg-alt);
    border-radius: var(--mpp-radius);
    overflow: hidden;
}
.mpp-sidebar-mfr-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.mpp-sidebar-mfr-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.mpp-sidebar-mfr-excerpt {
    font-size: 13px;
    color: var(--mpp-text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.mpp-sidebar-mfr-country {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mpp-border-light);
}
.mpp-sidebar-mfr-link {
    display: block;
    padding: 8px 16px;
    background: var(--mpp-brand);
    color: #fff;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}
.mpp-sidebar-mfr-link:hover {
    background: var(--mpp-brand-dark);
    color: #fff;
}

/* --- 侧栏：Trading & Shipping --- */
.mpp-sidebar-tiers {
    margin-bottom: 16px;
}
.mpp-sidebar-tiers-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--mpp-text-secondary);
    margin-bottom: 8px;
}
.mpp-sidebar-tiers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.mpp-sidebar-tiers-table th,
.mpp-sidebar-tiers-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--mpp-border-light);
}
.mpp-sidebar-tiers-table th {
    background: var(--mpp-bg-alt);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}
.mpp-sidebar-trading-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--mpp-border-light);
    font-size: 13px;
}
.mpp-sidebar-trading-item:last-child {
    border-bottom: none;
}

/* --- 侧栏：Inquiry CTA --- */
.mpp-sidebar-cta-desc {
    font-size: 13px;
    color: var(--mpp-text-secondary);
    margin-bottom: 16px;
    text-align: center;
}
.mpp-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin-bottom: 10px;
}
.mpp-btn:last-child {
    margin-bottom: 0;
}
.mpp-btn--primary {
    background: var(--mpp-brand);
    color: #fff;
}
.mpp-btn--primary:hover {
    background: var(--mpp-brand-dark);
    color: #fff;
}
.mpp-btn--outline {
    background: transparent;
    color: var(--mpp-brand);
    border: 2px solid var(--mpp-brand);
}
.mpp-btn--outline:hover {
    background: var(--mpp-brand-light);
}

/* --- 响应式 --- */
@media (max-width: 1024px) {
    .mpp-layout {
        flex-direction: column;
    }
    .mpp-summary {
        display: block;
    }
    .mpp-sidebar-summary {
        display: none;
    }
    .mpp-sidebar {
        flex: 1;
        width: 100%;
        position: static;
        order: 11; /* 移动端：侧栏整体移到主内容底部 */
    }
    .mpp-main {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    /* 调整主内容区顺序 */
    .mpp-gallery {
        order: 1;
    }
    .mpp-video {
        order: 2;
    }
    .mpp-summary {
        order: 3; /* Product Summary 在视频之后，Description 之前 */
    }
    .mpp-description {
        order: 4; /* Product Description 在 Summary 之后 */
    }
    .mpp-specs {
        order: 5;
    }
    .mpp-customization {
        order: 6;
    }
    .mpp-certs {
        order: 7;
    }
    .mpp-docs {
        order: 8;
    }
    .mpp-qa {
        order: 9;
    }
}

@media (max-width: 768px) {
    .mpp-container {
        padding: 0 16px;
    }
    .mpp-mobile-title {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .mpp-title {
        font-size: 22px;
    }
    .mpp-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mpp-sidebar {
        order: 3;
    }

    /* --- Certifications: table → card --- */
    .mpp-certs-table-wrap {
        overflow-x: visible;
    }
    .mpp-certs-table,
    .mpp-certs-table tbody {
        display: block;
    }
    .mpp-certs-table thead {
        display: none;
    }
    .mpp-certs-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 6px 12px;
        padding: 14px 16px;
        margin-bottom: 10px;
        border: 1px solid var(--mpp-border-light);
        border-radius: var(--mpp-radius);
        background: var(--mpp-bg-alt);
    }
    .mpp-certs-table tr:last-child {
        margin-bottom: 0;
    }
    .mpp-certs-table td {
        padding: 0;
        border-bottom: none;
    }
    /* Standard → header left */
    .mpp-certs-table td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
        font-weight: 700;
        font-size: 15px;
    }
    /* Status → header right */
    .mpp-certs-table td:nth-child(5) {
        grid-column: 2;
        grid-row: 1;
        text-align: right;
    }
    /* Body → full width, row 2, with top divider */
    .mpp-certs-table td:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: 8px;
        border-top: 1px solid var(--mpp-border-light);
    }
    /* Cert No. → full width, row 3 */
    .mpp-certs-table td:nth-child(3) {
        grid-column: 1 / -1;
        grid-row: 3;
    }
    /* Market → full width, row 4 */
    .mpp-certs-table td:nth-child(4) {
        grid-column: 1 / -1;
        grid-row: 4;
    }
    /* Label prefix for stacked items */
    .mpp-certs-table td[data-label]::before {
        content: attr(data-label);
        display: inline-block;
        font-size: 11px;
        font-weight: 600;
        color: var(--mpp-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        margin-right: 6px;
    }
    /* Standard and Status: no label */
    .mpp-certs-table td:nth-child(1)::before,
    .mpp-certs-table td:nth-child(5)::before {
        content: none;
    }
}
