/* 产品 3D 模型预览弹窗（固定 800x700） */
.td-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.td-modal.is-open {
    display: flex;
}

.td-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.td-modal__dialog {
    position: relative;
    width: 800px;
    height: 700px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.td-modal__head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.td-modal__title {
    font-size: 16px;
    font-weight: 600;
    color: #e94709;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-modal__sub {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-modal__close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.td-modal__close:hover {
    color: #e94709;
}

.td-modal__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #f5f6f8;
}

.td-modal__stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

.td-modal__hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    font-size: 14px;
    color: #888;
    pointer-events: none;
}

.td-modal__hint.is-hidden {
    display: none;
}

.td-modal__thumbs {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid #eee;
}

.td-modal__thumbs-list {
    flex: 1 1 auto;
    display: flex;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
}

.td-modal__thumbs-list:empty {
    display: none;
}

.td-modal__thumbs.is-empty {
    display: none;
}

.td-modal__download {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 8px 14px;
    border: 1px solid #e94709;
    border-radius: 4px;
    color: #e94709;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.td-modal__download:hover {
    background: #e94709;
    color: #fff;
}

.td-modal__download.is-hidden {
    display: none;
}

.td-thumb {
    flex: 0 0 auto;
    width: 92px;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 4px;
    background: #fff;
    text-align: center;
}

.td-thumb:hover {
    border-color: #e94709;
}

.td-thumb.is-active {
    border-color: #e94709;
    box-shadow: 0 0 0 1px #e94709 inset;
}

.td-thumb__img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    background: #f5f6f8;
    border-radius: 2px;
}

.td-thumb__ph {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    border-radius: 2px;
    color: #bbb;
    font-size: 12px;
}

.td-thumb__name {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    padding: 10px 22px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 14px;
    pointer-events: none;
}

/* 3D 源文件下载列表（产品文档 tab 内） */
.td-source-list {
    margin-top: 12px;
}

.td-source-list__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.td-source-list__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.td-source-list__item a {
    color: #e94709;
    word-break: break-all;
}

@media (max-width: 860px) {
    .td-modal__dialog {
        width: calc(100vw - 24px);
        height: calc(100vh - 80px);
    }
}
