/*
 * 申天模型 - 产品中心样式 v11.5
 * 修复：补全【项目终止】特效、保持无描边、保持16:9
 */

:root {
    --st-bg: #fbfbfd;
    --st-card: #ffffff;
    --st-blue: #0071e3;
    --st-text: #1d1d1f;
    --st-grey: #86868b;
    --st-border: #e5e5e7;
    --st-orange: #e6a23c;
    --st-green: #67c23a;
    --st-line: #eeeeee;
    --img-stroke: rgba(0, 0, 0, 0.08);
}

/* 全局重置 */
.st-product-page { background-color: var(--st-bg); color: var(--st-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; }
.st-main-container { max-width: 1200px; margin: 0 auto; padding: 80px 20px; }

/* 标题区 */
.st-hero-section { text-align: center; margin-bottom: 60px; }
.st-title { font-size: 3rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 10px; }
.st-subtitle { font-size: 1.2rem; color: var(--st-grey); font-weight: 400; }

/* 模块切换 */
.st-toggle-wrapper { display: flex; justify-content: center; margin-top: 40px; }
.st-toggle-bar { background: #e5e5e7; padding: 4px; border-radius: 100px; display: flex; position: relative; width: 340px; }
.st-toggle-btn { flex: 1; border: none; background: transparent; padding: 12px; font-size: 0.9rem; font-weight: 600; color: var(--st-grey); cursor: pointer; z-index: 2; transition: color 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.st-toggle-btn.active { color: var(--st-text); }
.st-toggle-slider { position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px); background: #fff; border-radius: 100px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); z-index: 1; }

.st-module { display: none; opacity: 0; }
.st-module.active { display: block; opacity: 1; animation: stFadeIn 0.8s ease forwards; }
@keyframes stFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 网格布局 */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 30px; }
.st-makerspace-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

/* --- 造物空间卡片 --- */
.maker-card { background: var(--st-card); border-radius: 32px; padding: 0; border: 1px solid var(--st-border); transition: all 0.4s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.02); overflow: hidden; }
.maker-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); }

/* 图片区域 (16:9, 无底边框) */
.maker-img {
    width: 100%; aspect-ratio: 16 / 9;
    overflow: hidden; position: relative; background: #fff;
    border-bottom: none;
}
.maker-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }

/* 顶部标签 */
.status-badge-new { position: absolute; top: 15px; left: 15px; padding: 6px 14px; border-radius: 100px; font-size: 11px; font-weight: 800; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); backdrop-filter: blur(8px); z-index: 5; letter-spacing: 0.5px; }
.badge-amber { background: rgba(255, 251, 235, 0.95); color: #b45309; border: 1px solid #fcd34d; }
.badge-amber .dot { background: #f59e0b; }
.badge-red { background: rgba(254, 242, 242, 0.95); color: #b91c1c; border: 1px solid #fca5a5; }
.badge-red .dot { background: #ef4444; }
.badge-green { background: rgba(236, 253, 245, 0.95); color: #047857; border: 1px solid #6ee7b7; }
.badge-green .dot { background: #10b981; }
.dot { width: 8px; height: 8px; border-radius: 50%; position: relative; }
.dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: inherit; opacity: 0.4; animation: stPulse 2s infinite; }
@keyframes stPulse { 0% { transform: scale(1); opacity: 0.4; } 100% { transform: scale(2.5); opacity: 0; } }

/* 内容区 */
.maker-content { padding: 10px 30px 30px 30px; }
.maker-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; color: #333; }
.maker-desc { font-size: 0.9rem; color: var(--st-grey); line-height: 1.6; margin-bottom: 30px; min-height: 45px; }

/* 进度条 */
.timeline-wrapper { display: flex; justify-content: space-between; align-items: flex-start; position: relative; margin-bottom: 30px; padding: 0 5px; }
.t-step { position: relative; display: flex; flex-direction: column; align-items: center; flex: 1; z-index: 2; }
.t-step::after { content: ''; position: absolute; top: 6px; left: 50%; width: 100%; height: 4px; background: var(--st-line); z-index: -1; transition: background 0.3s; }
.t-step:last-child::after { display: none; }
.t-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #e0e0e0; box-sizing: border-box; transition: all 0.3s; margin-bottom: 12px; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.t-label { font-size: 10px; color: #aaa; text-align: center; white-space: nowrap; transform: scale(0.9); }

.t-step.orange-dot .t-dot { border-color: var(--st-orange); }
.t-step.orange-line::after { background: var(--st-orange); }
.t-step.orange-gradient::after { background: linear-gradient(to right, var(--st-orange), var(--st-line)); }
.t-step.green-dot .t-dot { border-color: var(--st-green); }
.t-step.green-line::after { background: var(--st-green); }
.t-step.green-gradient::after { background: linear-gradient(to right, var(--st-green), var(--st-line)); }
.t-step.is-pill { flex: 0 0 auto; min-width: 70px; }
.t-step.is-pill .t-dot { width: auto; height: 24px; border-radius: 12px; border: none; color: #fff; font-weight: bold; padding: 0 10px; margin-top: -5px; }
.t-step.milestone-orange .t-dot { background: var(--st-orange); box-shadow: 0 4px 10px rgba(230, 162, 60, 0.4); }
.t-step.milestone-green .t-dot { background: var(--st-green); box-shadow: 0 4px 10px rgba(103, 194, 58, 0.4); }

/*
 * =========================================
 *  关键修复：项目终止特效 (之前丢失的部分)
 * =========================================
 */

/* 1. 红色终止框 (替代进度条) */
.termination-box {
    background: #fef2f2;
    border: 1px dashed #fca5a5;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 左对齐 */
    text-align: left;
    gap: 15px;
    margin-bottom: 25px;
}
.t-icon {
    width: 40px; height: 40px;
    background: #fee2e2; color: #ef4444;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.t-info h4 { font-size: 0.9rem; font-weight: 800; color: #b91c1c; margin: 0 0 2px 0; }
.t-info p { font-size: 0.8rem; color: #ef4444; margin: 0; }

/* 2. 图片黑白化 (氛围感) */
.maker-img.img-grayscale img {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* 3. 日期删除线 */
.release-date-box.date-terminated { border-top-color: #fee2e2; opacity: 0.7; }
.release-date-box.date-terminated span { text-decoration: line-through; color: #ef4444; }

/* 日期栏通用 */
.release-date-box { border-top: 1px solid #f0f0f0; padding-top: 15px; font-size: 12px; color: #999; }
.release-date-box span { display: block; font-weight: bold; font-size: 14px; color: #333; margin-top: 2px; }

/*
 * --- B. 匠心制作卡片 (3:2 经典摄影比例) ---
 */
.st-filter-bar { display: flex; justify-content: center; gap: 15px; margin-bottom: 50px; }
.st-filter-btn { border: none; background: #e5e5e7; padding: 10px 25px; border-radius: 100px; font-size: 0.85rem; font-weight: 600; color: var(--st-grey); cursor: pointer; transition: 0.3s; }
.st-filter-btn.active { background: var(--st-text); color: #fff; transform: scale(1.05); }

.st-gallery-item { display: block; }

.st-gallery-card {
    position: relative;
    /* 修改点：3:2 比例 (如 600x400) */
    aspect-ratio: 3 / 2;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid var(--img-stroke);
    cursor: zoom-in; /* 鼠标变成放大镜 */
}

.st-gallery-card img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 悬浮遮罩 */
.st-card-overlay {
    position: absolute; inset: 0;
    /* 调整渐变，让文字在 3:2 比例下更清晰 */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    padding: 25px;
    display: flex; flex-direction: column; justify-content: flex-end;
    opacity: 0; transform: translateY(15px);
    transition: all 0.4s ease; color: #fff;
    pointer-events: none; /* 关键：让鼠标点击穿透遮罩，点到图片上 */
}

.st-gallery-card:hover .st-card-overlay { opacity: 1; transform: translateY(0); }
.st-gallery-card:hover img { transform: scale(1.08); }

.st-card-overlay h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.st-card-overlay .tag { display: inline-block; color: #fff; background: var(--st-blue); padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; width: fit-content; }
.st-card-overlay p { font-size: 0.85rem; line-height: 1.5; color: rgba(255, 255, 255, 0.9); }

/* 悬浮交互状态 */
.st-gallery-card:hover .st-card-overlay {
    opacity: 1;
    transform: translateY(0);
}
.st-gallery-card:hover img {
    transform: scale(1.08); /* 图片轻微放大 */
}

/* 文字样式 */
.st-card-overlay h3 {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.st-card-overlay .tag {
    display: inline-block;
    color: #fff;
    background: var(--st-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    width: fit-content;
}
.st-card-overlay p {
    font-size: 0.85rem; line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* 灯箱 */
#lightbox { position: fixed; inset: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); z-index: 9999; display: none; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox-img { max-width: 90%; max-height: 85vh; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }

@media (max-width: 768px) {
    .st-grid { grid-template-columns: 1fr; }
    .st-toggle-bar { width: 300px; }
    .st-hero-section h1 { font-size: 2.2rem; }
    .timeline-wrapper { overflow-x: auto; padding-bottom: 10px; justify-content: flex-start; gap: 15px; }
    .t-step { min-width: 60px; flex: 0 0 auto; }
}