diff --git a/app/globals.css b/app/globals.css index a798722..514aed2 100644 --- a/app/globals.css +++ b/app/globals.css @@ -167,15 +167,17 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado .result-panel { padding: 24px 28px 28px; } .result-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; } -.best-match { display: grid; grid-template-columns: 180px 1fr; border: 1px solid #cfdaf0; border-radius: 15px; overflow: hidden; box-shadow: 0 8px 24px rgba(38,70,125,.08); } -.match-image-wrap { position: relative; min-height: 270px; background: #eff4fb; } -.match-image-wrap img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; } +.recommendation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 10px; } +.recommendation-card { min-width: 0; min-height: 442px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dce3ed; border-radius: 14px; background: white; box-shadow: 0 8px 24px rgba(38,70,125,.06); } +.recommendation-card.is-primary { border-color: #cfdaf0; box-shadow: 0 8px 24px rgba(38,70,125,.1); } +.recommendation-image-wrap { position: relative; height: 132px; flex: 0 0 132px; background: #eff4fb; } +.recommendation-image-wrap img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; } .match-badge { position: absolute; left: 12px; top: 12px; padding: 6px 9px; border-radius: 7px; color: white; background: var(--orange); font-size: 9px; font-weight: 800; } -.match-content { position: relative; padding: 19px 19px 16px; } +.recommendation-content { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 14px 13px 12px; } .match-score { position: absolute; right: 16px; top: 15px; display: grid; text-align: right; color: #7c889a; font-size: 9px; } .match-score strong { color: var(--blue); font-size: 18px; } .product-code { margin: 0 0 4px; color: #8b96a8; font-size: 9px; } -.match-content h3 { max-width: 250px; margin: 0; font-size: 19px; } +.recommendation-content h3 { min-height: 38px; max-width: calc(100% - 42px); margin: 0; overflow: hidden; font-size: 14px; line-height: 1.35; } .product-subtitle { margin: 5px 0 13px; color: #7b8799; font-size: 10px; } .metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; } .metric { padding: 8px 9px; border-radius: 8px; background: #f4f7fb; display: grid; gap: 3px; } @@ -186,20 +188,13 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado .price-line span { color: #7c8798; font-size: 9px; } .price-line strong { color: #e55726; font-size: 20px; } .price-line small { color: #9aa4b3; font-size: 8px; } -.source-line { display: flex; align-items: center; gap: 7px; padding-top: 9px; border-top: 1px solid #edf0f4; } +.source-line { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 9px; border-top: 1px solid #edf0f4; } .source-line span { color: #7c8798; font-size: 9px; } .source-line strong { color: var(--blue); font-size: 10px; } .source-line small { margin-left: auto; color: #9aa4b3; font-size: 8px; } .engineer-alert { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid #f0d29e; border-radius: 9px; background: #fff9ef; } .engineer-alert span { flex: 0 0 auto; padding: 4px 7px; border-radius: 5px; color: #9b5a0a; background: #ffe7bc; font-size: 8px; font-weight: 800; } .engineer-alert p { margin: 0; color: #815e2f; font-size: 9px; } -.alternative-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; } -.alternative-card { min-width: 0; display: grid; grid-template-columns: 58px 1fr; align-items: center; border: 1px solid #e1e6ee; border-radius: 10px; overflow: hidden; } -.alternative-card img { width: 58px; height: 58px; object-fit: cover; background: #f0f3f7; } -.alternative-card div { min-width: 0; padding: 7px 9px; } -.alternative-card span { color: var(--blue); font-size: 8px; font-weight: 700; } -.alternative-card h4 { margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; } -.alternative-card p { margin: 0; color: #8a95a6; font-size: 8px; } .result-actions { display: flex; gap: 9px; margin-top: 14px; } .result-actions .panel-primary { flex: 1; } .outline-button { border: 1px solid #cfd7e4; border-radius: 10px; padding: 0 17px; background: white; cursor: pointer; font-size: 11px; font-weight: 650; } @@ -493,10 +488,10 @@ footer > span { color: #9aa4b2; font-size: 10px; } .selector-shell { border-radius: 16px; } .question-panel, .result-panel { padding: 20px 16px; } .welcome-panel { padding: 55px 20px 35px; } - .choice-grid, .two-fields, .parameter-grid, .form-grid, .alternative-list { grid-template-columns: 1fr; } + .choice-grid, .two-fields, .parameter-grid, .form-grid, .recommendation-grid { grid-template-columns: 1fr; } .torque-presets { grid-template-columns: repeat(4, 1fr); } - .best-match { grid-template-columns: 1fr; } - .match-image-wrap { height: 240px; } + .recommendation-card { min-height: 0; } + .recommendation-image-wrap { height: 190px; flex-basis: 190px; } .capability-strip { grid-template-columns: 1fr 1fr; gap: 24px 0; padding: 28px 16px; } .capability-strip div:nth-child(2) { border-right: 0; } .section-heading { align-items: flex-start; flex-direction: column; gap: 18px; } diff --git a/app/page.tsx b/app/page.tsx index 21f645e..e61aef7 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -788,33 +788,39 @@ export default function Home() { -
-
- {top.product.name} - {top.coreCompatible ? "首选推荐" : "待复核候选"} -
-
-
匹配度{top.confidence}%
-

{top.product.code}

-

{top.product.name}

-

{top.product.category} · {top.product.size || "尺寸待复核"}

-
- - - - - - -
- -
- 官方目录型号 - {top.product.category} - 价格与交期按用量确认 -
-
+
+ {topMatches.map((match, index) => ( +
+
+ {match.product.name} + + {index === 0 ? (match.coreCompatible ? "首选推荐" : "待复核候选") : `${match.confidence}% 匹配`} + +
+
+
匹配度{match.confidence}%
+

{match.product.code}

+

{match.product.name}

+

{match.product.category} · {match.product.size || "尺寸待复核"}

+
+ + + + + + +
+
    + {match.reasons.slice(0, 2).map((reason) =>
  • ✓ {reason}
  • )} +
+
+ 官方目录型号 + {match.product.category} + 价格与交期按用量确认 +
+
+
+ ))}
{needsEngineer && ( @@ -826,19 +832,6 @@ export default function Home() {
)} -
- {topMatches.slice(1).map((match) => ( -
- {match.product.name} -
- {match.confidence}% 匹配 -

{match.product.name}

-

{formatTorque(match.product.torque)} kgf·cm · {match.product.category} · {match.product.gear}

-
-
- ))} -
- {!showSampleForm && (