/* --- 只對產品頁生效 --- */
:root{
  --brand:#1a2a4f;
  --ink:#2a2f3a;
  --soft:#f6f8fc;
  --border:#e6e8ef;
}

/* 將樣式限制在產品頁，避免影響其他頁 */
body.products-page{background:var(--soft); color:var(--ink); margin:0}
body.products-page .topnav{max-width:1200px;margin:0 auto;padding:10px 16px}

/* 區塊標題 */
body.products-page .products{max-width:1200px;margin:0 auto;padding:22px 16px}
body.products-page .products h2{margin:0 0 14px;color:var(--brand);letter-spacing:.4px}

/* 圖牆（自適應欄數） */
body.products-page .product-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px; /* 緊湊一點 */
}
@media (max-width:1200px){
  body.products-page .product-grid{grid-template-columns:repeat(4,1fr)}
}
@media (max-width:900px){
  body.products-page .product-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:640px){
  body.products-page .product-grid{grid-template-columns:repeat(2,1fr)}
}

/* 卡片樣式 + 陰影 + 懸浮效果 */
body.products-page .product-card{
  position:relative;
  border:1px solid var(--border);
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 3px 6px rgba(0,0,0,.08), 0 6px 18px rgba(0,0,0,.06);
  transition:transform .25s ease, box-shadow .25s ease;
}
body.products-page .product-card a{display:block; line-height:0}
body.products-page .product-card img{
  width:100%;
  aspect-ratio:1/1; /* 統一方形比例 */
  object-fit:cover;
  display:block;
  transform:scale(1);
  transition:transform .35s ease;
}

/* 懸浮：微浮起 + 放大 + 陰影加強 */
body.products-page .product-card:hover{
  transform:translateY(-4px);
  box-shadow:0 6px 12px rgba(0,0,0,.12), 0 12px 30px rgba(0,0,0,.1);
}
body.products-page .product-card:hover img{transform:scale(1.04)}

/* 右下角搜尋圖示提示 */
body.products-page .product-card::after{
  content:"🔍";
  position:absolute;
  right:10px;
  bottom:10px;
  font-size:18px;
  background:rgba(0,0,0,.55);
  color:#fff;
  width:32px; height:32px; display:grid; place-items:center;
  border-radius:8px; opacity:0; transform:translateY(6px);
  transition:all .25s ease;
}
body.products-page .product-card:hover::after{opacity:1; transform:translateY(0)}

/* Lightbox（純 CSS） */
body.products-page .lightbox{
  position:fixed; inset:0;
  background:rgba(0,0,0,.9);
  display:none; align-items:center; justify-content:center;
  z-index:999; padding:16px;
}
body.products-page .lightbox:target{display:flex}
body.products-page .lightbox img{
  max-width:92vw; max-height:92vh;
  border-radius:12px; box-shadow:0 6px 30px rgba(0,0,0,.5);
}
body.products-page .lightbox .close{
  position:absolute; top:22px; right:26px;
  width:40px; height:40px; border-radius:10px;
  background:rgba(255,255,255,.12);
  color:#fff; font-size:28px; line-height:38px; text-align:center;
  text-decoration:none; border:1px solid rgba(255,255,255,.25);
}
body.products-page .lightbox .close:hover{background:rgba(255,255,255,.2)}
