/* ==========================================================================
   灵机易动 · 配件查询（pages/apt_parts）
   设计基线：1100px 容器 / 10px 圆角 / 柔和阴影 / 无硬边框 / 无装饰特效
   颜色全部走主题变量，浅色深色自动适配
   ========================================================================== */

.ljyi-parts-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 48px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.6;
}

/* hidden 兜底：display:flex/block 的类选择器优先级高于 UA 的 [hidden]{display:none}，
   不强制会被覆盖，导致「加载更多」「无图 img」等明明设了 hidden 却还在显示 */
.ljyi-parts-shell [hidden] { display: none !important; }

/* ============================ 页头 ============================ */
.parts-head { padding: 18px 4px 0; margin: 0 0 22px; }

.parts-eyebrow {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 14px; font-size: 12px; font-weight: 600;
    letter-spacing: .06em; color: var(--text-secondary);
}
.parts-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: #3b82f6; }

.parts-head h1 {
    margin: 0 0 12px; font-size: 34px; line-height: 1.28;
    font-weight: 700; letter-spacing: -.01em; color: var(--text-primary);
}
.parts-desc {
    margin: 0; max-width: 620px;
    font-size: 15px; line-height: 1.75; color: var(--text-secondary);
}

.parts-stats {
    display: flex; flex-wrap: wrap; margin-top: 26px; padding-top: 18px;
    border-top: 1px solid var(--border-primary);
}
.parts-stat {
    display: flex; flex-direction: column; gap: 3px;
    padding-right: 38px; margin-right: 38px;
    border-right: 1px solid var(--border-primary);
}
.parts-stat:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.parts-stat strong {
    font-size: 24px; line-height: 1.2; font-weight: 700;
    color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.parts-stat span { font-size: 12px; color: var(--text-secondary); }

/* ============================ 筛选工具条 ============================ */
.parts-toolbar {
    position: sticky; top: 0; z-index: 20;
    padding: 12px 0 14px; margin: 0 0 16px;
    background: var(--bg-body);
}
.parts-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.parts-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 10px; border: none;
    font-size: 13px; font-family: inherit; color: var(--text-secondary);
    background: var(--bg-hover); cursor: pointer; white-space: nowrap;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    user-select: none;
}
.parts-tab:hover { background: var(--border-primary); color: var(--text-primary); }
.parts-tab.active {
    background: #3b82f6; color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, .22);
}
.parts-tab-num {
    font-size: 11px; line-height: 1; padding: 2px 5px; border-radius: 6px;
    background: rgba(15, 23, 42, .06); color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}
.parts-tab.active .parts-tab-num { background: rgba(255, 255, 255, .22); color: #fff; }

.parts-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.parts-search-wrap {
    position: relative; flex: 1 1 340px; max-width: 460px;
    display: flex; align-items: center;
}
.parts-search-ic {
    position: absolute; left: 14px; width: 15px; height: 15px; pointer-events: none;
    background-color: var(--text-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat center / contain;
}
.parts-search {
    width: 100%; padding: 10px 16px 10px 38px;
    border: 1px solid var(--border-input); border-radius: 10px;
    background: var(--bg-card); color: var(--text-primary);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.parts-search::placeholder { color: var(--text-muted); }
.parts-search:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
/* 去掉 WebKit 搜索框自带的清除按钮，避免和圆角冲突 */
.parts-search::-webkit-search-cancel-button { -webkit-appearance: none; }

.parts-brand {
    flex: 0 0 auto; min-width: 160px; padding: 10px 34px 10px 14px;
    border: 1px solid var(--border-input); border-radius: 10px;
    background-color: var(--bg-card); color: var(--text-primary);
    font-size: 14px; font-family: inherit; cursor: pointer; outline: none;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.parts-brand:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }

/* ============================ 卡片网格 ============================ */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
    gap: 14px;
    align-content: start;
}
.parts-hidden { display: none !important; }

.parts-card {
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.parts-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .09);
}
html[data-theme="dark"] .parts-card { box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .parts-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

/* 首图区：4:3，图与占位共用一块底 */
.parts-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(155deg, var(--bg-secondary) 0%, var(--bg-hover) 100%);
    overflow: hidden;
}
/* 占位时的柔和底盘：让图标有落点，避免整片空白（有图时被图片覆盖，不影响） */
.parts-thumb::before {
    content: ""; position: absolute;
    width: 124px; height: 124px; border-radius: 50%;
    background: var(--bg-card); opacity: .72;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .045);
}
.parts-thumb img {
    width: 100%; height: 100%; object-fit: contain; display: block;
    padding: 10px; box-sizing: border-box;
    transition: transform .3s ease;
}
.parts-card:hover .parts-thumb img { transform: scale(1.035); }

/* 有真图时：白底展示，像商品主图那样干净；不再叠底盘圆 */
.parts-thumb.has-img { background: #fff; }
.parts-thumb.has-img::before { display: none; }
.parts-thumb.has-img img { padding: 6px; mix-blend-mode: multiply; }
html[data-theme="dark"] .parts-thumb.has-img { background: #f4f6f9; }

/* 品类占位图标：走 mask，颜色跟随 --text-muted，深浅色自动适配 */
.parts-thumb-ph {
    position: relative; z-index: 1;
    width: 70px; height: 70px;
    background-color: var(--text-muted);
    opacity: .55;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center;  mask-position: center;
    -webkit-mask-size: contain;     mask-size: contain;
}
/* 图片加载失败时，回落到该类品的占位图形 */
.parts-thumb.is-empty::after {
    content: ""; position: absolute; inset: 0; margin: auto;
    width: 54px; height: 54px;
    background-color: var(--text-muted); opacity: .4;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 16l5-5 4 4 3-3 6 6'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 16l5-5 4 4 3-3 6 6'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* —— 9 个品类图标 —— */
.parts-ic-cpu { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.5' y='6.5' width='11' height='11' rx='1.6'/%3E%3Crect x='10.2' y='10.2' width='3.6' height='3.6' rx='.6'/%3E%3Cpath d='M10 6.5V3.6M14 6.5V3.6M10 20.4v-2.9M14 20.4v-2.9M6.5 10H3.6M6.5 14H3.6M20.4 10h-2.9M20.4 14h-2.9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.5' y='6.5' width='11' height='11' rx='1.6'/%3E%3Crect x='10.2' y='10.2' width='3.6' height='3.6' rx='.6'/%3E%3Cpath d='M10 6.5V3.6M14 6.5V3.6M10 20.4v-2.9M14 20.4v-2.9M6.5 10H3.6M6.5 14H3.6M20.4 10h-2.9M20.4 14h-2.9'/%3E%3C/svg%3E"); }

.parts-ic-motherboard { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3.6' width='18' height='16.8' rx='1.8'/%3E%3Crect x='6' y='6.6' width='6.4' height='6.4' rx='.8'/%3E%3Cpath d='M15.6 6.8h2.6M15.6 9.8h2.6M15.6 12.8h2.6M6 16.4h12.2M6 18.6h8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3.6' width='18' height='16.8' rx='1.8'/%3E%3Crect x='6' y='6.6' width='6.4' height='6.4' rx='.8'/%3E%3Cpath d='M15.6 6.8h2.6M15.6 9.8h2.6M15.6 12.8h2.6M6 16.4h12.2M6 18.6h8'/%3E%3C/svg%3E"); }

.parts-ic-gpu { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.8' y='6' width='20.4' height='11.2' rx='1.8'/%3E%3Ccircle cx='7.6' cy='11.6' r='2.7'/%3E%3Ccircle cx='16.4' cy='11.6' r='2.7'/%3E%3Cpath d='M5 17.2v3.2M19 17.2v3.2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.8' y='6' width='20.4' height='11.2' rx='1.8'/%3E%3Ccircle cx='7.6' cy='11.6' r='2.7'/%3E%3Ccircle cx='16.4' cy='11.6' r='2.7'/%3E%3Cpath d='M5 17.2v3.2M19 17.2v3.2'/%3E%3C/svg%3E"); }

.parts-ic-memory { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.8' y='6.4' width='20.4' height='8.4' rx='1.4'/%3E%3Crect x='4.8' y='8.9' width='3.2' height='3.4' rx='.5'/%3E%3Crect x='10.4' y='8.9' width='3.2' height='3.4' rx='.5'/%3E%3Crect x='16' y='8.9' width='3.2' height='3.4' rx='.5'/%3E%3Cpath d='M5.4 14.8v3.4M8.6 14.8v3.4M11.8 14.8v3.4M15 14.8v3.4M18.2 14.8v3.4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.8' y='6.4' width='20.4' height='8.4' rx='1.4'/%3E%3Crect x='4.8' y='8.9' width='3.2' height='3.4' rx='.5'/%3E%3Crect x='10.4' y='8.9' width='3.2' height='3.4' rx='.5'/%3E%3Crect x='16' y='8.9' width='3.2' height='3.4' rx='.5'/%3E%3Cpath d='M5.4 14.8v3.4M8.6 14.8v3.4M11.8 14.8v3.4M15 14.8v3.4M18.2 14.8v3.4'/%3E%3C/svg%3E"); }

.parts-ic-storage { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.8' y='4.6' width='18.4' height='14.8' rx='2'/%3E%3Cpath d='M6.4 8.6h8.2M6.4 12h5.4'/%3E%3Ccircle cx='16.8' cy='15.4' r='1.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.8' y='4.6' width='18.4' height='14.8' rx='2'/%3E%3Cpath d='M6.4 8.6h8.2M6.4 12h5.4'/%3E%3Ccircle cx='16.8' cy='15.4' r='1.5'/%3E%3C/svg%3E"); }

.parts-ic-psu { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.6' y='5.4' width='18.8' height='13.2' rx='1.8'/%3E%3Ccircle cx='11.4' cy='12' r='4.6'/%3E%3Cpath d='M11.4 7.4v9.2M6.8 12h9.2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.6' y='5.4' width='18.8' height='13.2' rx='1.8'/%3E%3Ccircle cx='11.4' cy='12' r='4.6'/%3E%3Cpath d='M11.4 7.4v9.2M6.8 12h9.2'/%3E%3C/svg%3E"); }

.parts-ic-cooler { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2.8' width='12' height='12.4' rx='1.4'/%3E%3Cpath d='M8.6 5.8h6.8M8.6 8.4h6.8M8.6 11h6.8'/%3E%3Cpath d='M9.2 15.2v5.6M14.8 15.2v5.6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2.8' width='12' height='12.4' rx='1.4'/%3E%3Cpath d='M8.6 5.8h6.8M8.6 8.4h6.8M8.6 11h6.8'/%3E%3Cpath d='M9.2 15.2v5.6M14.8 15.2v5.6'/%3E%3C/svg%3E"); }

.parts-ic-case { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.6' y='2.4' width='12.8' height='19.2' rx='1.8'/%3E%3Ccircle cx='12' cy='7.4' r='2.2'/%3E%3Cpath d='M8.6 12.4h6.8M8.6 15.2h6.8M8.6 18h4.4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.6' y='2.4' width='12.8' height='19.2' rx='1.8'/%3E%3Ccircle cx='12' cy='7.4' r='2.2'/%3E%3Cpath d='M8.6 12.4h6.8M8.6 15.2h6.8M8.6 18h4.4'/%3E%3C/svg%3E"); }

.parts-ic-display { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.8' y='3.8' width='20.4' height='13.2' rx='1.8'/%3E%3Cpath d='M9 20.4h6M12 17v3.4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.8' y='3.8' width='20.4' height='13.2' rx='1.8'/%3E%3Cpath d='M9 20.4h6M12 17v3.4'/%3E%3C/svg%3E"); }

/* 卡片正文 */
.parts-body { display: flex; flex-direction: column; gap: 7px; padding: 12px 13px 0; flex: 1; }
.parts-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.parts-brand-tag {
    font-size: 11px; line-height: 1.5; padding: 1px 7px; border-radius: 6px;
    background: var(--bg-hover); color: var(--text-secondary);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.parts-cat-tag {
    font-size: 11px; line-height: 1.5; padding: 1px 7px; border-radius: 6px;
    background: rgba(59, 130, 246, .1); color: #3b82f6;
}
.parts-name {
    margin: 0; font-size: 13.5px; line-height: 1.45; font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.9em;
}
/* 参数行固定两行高度，保证卡片底部对齐 */
.parts-chips {
    display: flex; flex-wrap: wrap; gap: 4px;
    min-height: 40px; align-content: flex-start; overflow: hidden;
}
.parts-chips span {
    font-size: 11px; line-height: 1.5; padding: 1px 7px; border-radius: 6px;
    background: var(--bg-hover); color: var(--text-secondary);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 卡片底部操作 */
.parts-foot {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 13px 13px; margin-top: auto;
}
.parts-view {
    flex: 1; padding: 7px 12px; border: none; border-radius: 10px;
    background: var(--bg-hover); color: var(--text-primary);
    font-size: 12.5px; font-family: inherit; font-weight: 600;
    cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.parts-view:hover {
    background: #3b82f6; color: #fff;
    box-shadow: 0 3px 10px rgba(59, 130, 246, .24);
}
.parts-site {
    flex: none; min-width: 48px; padding: 7px 10px; border-radius: 10px;
    text-align: center; font-size: 12.5px; color: var(--text-tertiary); text-decoration: none;
    transition: background .18s ease, color .18s ease;
}
.parts-site:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ============================ 加载更多 / 空状态 ============================ */
.parts-more-wrap { display: flex; justify-content: center; margin-top: 26px; }
.parts-more {
    padding: 10px 26px; border: none; border-radius: 10px;
    background: var(--bg-card); color: var(--text-secondary);
    font-size: 13.5px; font-family: inherit; cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.parts-more b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.parts-more:hover {
    background: var(--bg-hover); color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.parts-empty {
    margin: 40px 0; text-align: center;
    font-size: 14px; color: var(--text-muted);
}

/* ============================ 详情模态（居中） ============================ */
.parts-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.parts-modal[hidden] { display: none; }
.parts-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.parts-modal-box {
    position: relative; z-index: 1;
    width: 100%; max-width: 880px; max-height: calc(100vh - 48px);
    overflow: auto;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
    animation: partsPop .18s ease-out;
}
@keyframes partsPop {
    from { opacity: 0; transform: translateY(8px) scale(.99); }
    to   { opacity: 1; transform: none; }
}
html[data-theme="dark"] .parts-modal-box { box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }

.parts-modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 30px; height: 30px; border: none; border-radius: 10px;
    background: var(--bg-hover); color: var(--text-secondary);
    font-size: 14px; line-height: 1; cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
.parts-modal-close:hover { background: var(--border-primary); color: var(--text-primary); }

.parts-modal-grid { display: grid; grid-template-columns: 336px minmax(0, 1fr); }

.parts-modal-media {
    display: flex; flex-direction: column;
    padding: 18px; background: linear-gradient(155deg, var(--bg-secondary) 0%, var(--bg-hover) 100%);
    border-radius: 10px 0 0 10px;
}
.parts-modal-stage {
    position: relative; flex: 1 1 auto; min-height: 300px; aspect-ratio: auto;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    overflow: hidden;
}
.parts-modal-stage img { width: 100%; height: 100%; object-fit: contain; padding: 12px; box-sizing: border-box; }
/* 有真图时白底，像商品详情页的主图区 */
.parts-modal-stage.has-img { background: #fff; }
.parts-modal-ph {
    width: 84px; height: 84px; opacity: .45;
    background-color: var(--text-muted);
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center;  mask-position: center;
    -webkit-mask-size: contain;     mask-size: contain;
}
.parts-modal-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.parts-modal-thumbs img {
    width: 52px; height: 52px; object-fit: contain;
    background: var(--bg-card); border-radius: 8px; padding: 4px; box-sizing: border-box;
    cursor: pointer; opacity: .62; transition: opacity .18s ease, box-shadow .18s ease;
}
.parts-modal-thumbs img:hover { opacity: 1; }
.parts-modal-thumbs img.active { opacity: 1; box-shadow: 0 0 0 2px #3b82f6; }

.parts-modal-info { padding: 24px 26px 26px; display: flex; flex-direction: column; }
.parts-modal-info h3 {
    margin: 10px 0 0; font-size: 19px; line-height: 1.4; font-weight: 700;
    color: var(--text-primary); letter-spacing: -.01em;
}
.parts-modal-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.parts-modal-chips span {
    font-size: 12px; padding: 2px 8px; border-radius: 6px;
    background: var(--bg-secondary); color: var(--text-secondary);
}

.parts-spec-list {
    display: grid; grid-template-columns: 88px minmax(0, 1fr);
    gap: 9px 14px; margin: 18px 0 0; padding: 16px 0 0;
    border-top: 1px solid var(--border-primary);
    font-size: 13px;
}
.parts-spec-list dt { color: var(--text-tertiary); }
.parts-spec-list dd { margin: 0; color: var(--text-primary); word-break: break-word; }

.parts-modal-note {
    margin: 14px 0 0; padding: 9px 12px; border-radius: 8px;
    background: var(--bg-secondary); color: var(--text-tertiary);
    font-size: 12px; line-height: 1.6;
}

.parts-modal-actions {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: auto; padding-top: 20px;
}
.parts-modal-site {
    display: inline-flex; align-items: center; padding: 10px 20px;
    border-radius: 10px; background: #3b82f6; color: #fff;
    font-size: 13.5px; font-weight: 600; text-decoration: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, .22);
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.parts-modal-site:hover {
    background: #2f74e8; color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(59, 130, 246, .28);
}
.parts-modal-price { font-size: 12.5px; color: var(--text-muted); }

/* ============================ 响应式 ============================ */
@media (max-width: 860px) {
    .parts-modal-grid { grid-template-columns: minmax(0, 1fr); }
    .parts-modal-media { border-radius: 10px 10px 0 0; }
    .parts-modal-stage { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
    .parts-modal-stage img { padding: 10px; }
    .parts-modal-ph { width: 62px; height: 62px; }
}

@media (max-width: 760px) {
    .ljyi-parts-shell { padding: 12px 14px 36px; }
    .parts-head h1 { font-size: 27px; }
    .parts-desc { font-size: 14px; }
    .parts-stats { margin-top: 20px; padding-top: 14px; }
    .parts-stat { padding-right: 22px; margin-right: 22px; }
    .parts-stat strong { font-size: 20px; }
    .parts-toolbar { padding: 10px 0 12px; }
    .parts-tabs { gap: 5px; }
    .parts-tab { padding: 6px 10px; font-size: 12.5px; }
    .parts-search-wrap { flex: 1 1 100%; max-width: none; }
    .parts-brand { flex: 1 1 100%; min-width: 0; }
    .parts-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .parts-thumb-ph { width: 40px; height: 40px; }
    .parts-name { font-size: 12.5px; }
    .parts-body { padding: 10px 10px 0; gap: 6px; }
    .parts-foot { padding: 9px 10px 11px; }
    .parts-modal { padding: 12px; }
    .parts-modal-info { padding: 18px 18px 20px; }
    .parts-modal-info h3 { font-size: 16.5px; }
    .parts-spec-list { grid-template-columns: 76px minmax(0, 1fr); font-size: 12.5px; }
}

@media (max-width: 400px) {
    .parts-grid { grid-template-columns: minmax(0, 1fr); }
    .parts-thumb-ph { width: 52px; height: 52px; }
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
    .parts-card, .parts-thumb img, .parts-modal-box { transition: none; animation: none; }
    .parts-card:hover { transform: none; }
    .parts-card:hover .parts-thumb img { transform: none; }
}
