/* ============================================================
   product/css.css —— 产品列表（总表 / 分类页）+ 产品详情
   1) 两栏布局  2) 分类侧栏  3) 卡片栅格  4) 详情主图与信息  5) 响应式
   ============================================================ */

/* ---------- 1) 两栏布局 ---------- */
.product-layout {display:grid;grid-template-columns:264px minmax(0,1fr);gap:56px;align-items:start}

/* ---------- 2) 分类侧栏 ---------- */
.product-side-col {position:sticky;top:100px;align-self:start}
.product-side {position:static;overflow:hidden;border:1px solid var(--line);border-radius:var(--r);background:#fff}
.product-side h2 {margin:0;padding:22px 24px;background:var(--ink);color:#fff;font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;text-transform:none}
.product-filter {display:grid}
.product-filter > a,.product-filter .product-category-toggle {display:flex;align-items:center;min-height:50px;padding:12px 24px;border-top:1px solid var(--line);border-left:3px solid transparent;color:var(--ink);font-size:14px;font-weight:600;line-height:1.4;text-decoration:none;transition:background .2s,color .2s,border-color .2s}
.product-filter > a:first-child {border-top:0}
.product-filter > a:hover,.product-filter > a:focus-visible,.product-filter .product-category-toggle:hover {border-left-color:rgba(248,120,63,.55);background:#faf9f7;color:var(--o)}
/* 一级分类名 + 折叠箭头（箭头取设计稿：8px 直角翻转 45°→225°） */
.product-filter .product-category-name {flex:1 1 auto;min-width:0;color:inherit;font:inherit;text-decoration:none}
.product-filter .product-category-arrow-btn {display:flex;flex:0 0 auto;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}
.product-category-arrow {width:8px;height:8px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .2s ease}
.product-category-arrow-btn[aria-expanded="true"] .product-category-arrow {transform:rotate(225deg) translate(-1px,-1px)}
/* 二级分类列表（折叠区） */
.product-subcategory-list {display:grid;gap:2px;margin:0;padding:0 14px 14px;list-style:none}
.product-subcategory-list[hidden] {display:none}
.product-subcategory-list a {display:flex;align-items:center;min-height:40px;padding:8px 10px 8px 22px;border-radius:var(--r);color:var(--muted);font-size:12px;font-weight:500;line-height:1.45;text-decoration:none;transition:background .2s,color .2s}
.product-subcategory-list a:hover,.product-subcategory-list a:focus-visible {background:rgba(248,120,63,.09);color:var(--o)}
.product-side-col .catalog-download {margin:18px 0 0}
.product-catalog-download {
  margin-top: 18px;
}

/* ---------- 3) 卡片栅格 ---------- */
.product-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.product-card {display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:var(--r);background:#fff;transition:box-shadow .24s,border-color .24s}
.product-card:hover {border-color:rgba(248,120,63,.4);box-shadow:0 18px 40px rgba(30,27,33,.08)}
.product-card-media {display:flex;align-items:center;justify-content:center;padding:20px;aspect-ratio:1/1;background:#fbfaf9}
.product-card-media img {width:100%;height:100%;object-fit:contain}
.product-card-body {display:flex;flex:1 1 auto;flex-direction:column;padding:18px 20px 22px}
.product-card-body h3 {margin:0 0 8px;font-size:16px;letter-spacing:-.01em}
.product-card-body p {flex:1 1 auto;margin:0 0 18px;color:var(--muted);font-size:13px;line-height:1.6}
.product-card-link {align-self:flex-start;padding-bottom:4px;border-bottom:1px solid rgba(248,120,63,.42);color:var(--o);font-size:12px;font-weight:600;letter-spacing:.04em;text-decoration:none;text-transform:uppercase}

/* ---------- 4) 详情主图与信息 ---------- */
.product-detail {display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center}
.product-detail-media {display:flex;align-items:center;justify-content:center;margin:0;padding:34px;aspect-ratio:1/1;border:1px solid var(--line);border-radius:var(--r);background:#fbfaf9}
.product-detail-media img {width:100%;height:100%;object-fit:contain}
.product-detail-info h2 {margin:10px 0 14px;font-size:clamp(26px,2.6vw,40px)}
.product-detail-kicker {margin:0;color:var(--o);font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.product-detail-summary {margin:0 0 26px;color:var(--muted);font-size:15px;line-height:1.72}
.product-detail-body {max-width:none;margin-top:64px;padding-top:48px;border-top:1px solid var(--line)}

/* ---------- 5) 响应式 ---------- */
@media(max-width:1180px) {
  .product-layout {grid-template-columns:220px minmax(0,1fr);gap:34px}
  .product-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .product-side-col .catalog-download {padding:10px 8px}
}

@media(max-width:900px) {
  .product-detail {grid-template-columns:1fr;gap:30px}
  .product-detail-body {margin-top:44px;padding-top:34px}
}

@media(max-width:820px) {
  .product-layout {grid-template-columns:1fr;gap:26px}
  .product-side-col {position:static}
  .product-filter {display:grid;gap:0}
  .product-filter a,.product-filter .product-category-toggle {min-height:50px;padding:12px 24px;border:0;border-top:1px solid var(--line);border-left:3px solid transparent}
  .product-filter a:first-child {border-top:0}
  .product-subcategory-list {padding:0 10px 12px}
  .product-subcategory-list a {min-height:44px}
  .product-grid {grid-template-columns:1fr 1fr;gap:14px}
  .product-card-body {padding:14px 14px 18px}
}

/* ---------- 产品目录列表（横向行：图 + 型号 + 6 格规格，对齐设计稿） ---------- */
.catalog-list {display:flex;flex-direction:column}
.catalog-card {border-bottom:1px solid var(--line)}
.catalog-card-link {display:grid;grid-template-columns:minmax(190px,29%) minmax(0,1fr);column-gap:clamp(18px,2.4vw,32px);padding:30px 0;color:inherit;text-decoration:none}
.catalog-card:first-child .catalog-card-link {padding-top:0}
.catalog-card-media {grid-column:1;grid-row:1;display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/0.88}
.catalog-card-media img {width:100%;height:94%;object-fit:contain}
.catalog-card-body {grid-column:2;grid-row:1;display:flex;flex-direction:column;min-width:0;padding:0;justify-content: center;}
.catalog-card-model {margin:0 0 20px;color:#404147;font-size:clamp(21px,2.3vw,30px);font-weight:400;line-height:1.18;letter-spacing:0;overflow-wrap:anywhere;transition:color .2s}
.catalog-card-link:hover .catalog-card-model {color:var(--o)}
.catalog-card-summary {color:var(--muted);font-size:13px;line-height:1.72;letter-spacing:0}
.catalog-card-specs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.catalog-card-spec {min-width:0;min-height:70px;display:flex;flex-direction:column;justify-content:center;gap:6px;padding:10px 14px;background:#f3f3f4}
.catalog-card-spec-label {color:#77777b;font-size:13px;font-weight:400;line-height:1.3}
.catalog-card-spec-value {color:#404147;font-size:16px;font-weight:500;line-height:1.28;overflow-wrap:anywhere}
.catalog-card-spec-value.is-accent {color:var(--o)}

/* 侧栏：全部产品高亮 + 下载目录按钮 */
.product-filter > a.is-active,.product-filter .product-category-toggle.is-active {border-left-color:var(--o);background:#fff6f1;color:var(--o);font-weight:600}
.product-subcategory-list a.is-active {background:rgba(248,120,63,.09);color:var(--o);font-weight:600}
.catalog-download {display:flex;align-items:center;justify-content:center;width:100%;min-height:52px;margin:0;padding:10px 16px;border:1px solid var(--o);border-radius:var(--r);background:var(--o);color:#fff;font-family:inherit;font-size:13px;font-weight:600;line-height:1.35;text-align:center;cursor:pointer;transition:background-color .2s}
.catalog-download:hover {background:#e96730}

@media(max-width:820px) {
  .catalog-card-link {grid-template-columns:minmax(0,1fr);row-gap:12px;padding:24px 0}
  .catalog-card:first-child .catalog-card-link {padding-top:0}
  .catalog-card-media {grid-column:1;grid-row:1;max-width:340px;aspect-ratio:1/0.68;margin-inline:auto}
  .catalog-card-body {grid-column:1;grid-row:2}
  .catalog-card-model {font-size:23px}
  .catalog-card-specs {grid-template-columns:repeat(2,minmax(0,1fr))}
  .catalog-card-spec {min-height:68px;padding:9px 12px}
}

@media(max-width:520px) {
  .catalog-card-media {aspect-ratio:1/0.68}
}
/* 六参数一格都没有时不留空白（产品没填自定义属性） */
.catalog-card-specs:not(:has(.catalog-card-spec)) {display:none}
