/* 分类页商品网格：与首页 home.css 中 .product-grid / .product-card 卡片样式保持一致。
   因 home.css 含首页专属全局重置规则且仅在 common/home 路由加载，
   此处单独提取卡片样式并以 .category-product-grid 作用域隔离。 */
.category-product-grid { --cpg-orange:#ff5000; --cpg-muted:#86909c; --cpg-text:#1d2129; margin-top:12px; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:24px; }
.category-product-grid .product-card { position:relative; min-width:0; padding-bottom:8px; overflow:hidden; background:#fff; border-radius:8px; cursor:pointer; transition:transform .2s,box-shadow .2s; }
.category-product-grid .product-card:hover { z-index:2; transform:translateY(-3px); box-shadow:0 10px 28px rgba(29,33,41,.18); }
.category-product-grid .product-image { position:relative; width:100%; aspect-ratio:1; overflow:hidden; background:#eee; }
.category-product-grid .product-image img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.category-product-grid .product-card:hover .product-image img { transform:scale(1.07); }
.category-product-grid .cart-button { position:absolute; right:12px; bottom:12px; width:40px; height:40px; display:grid; place-items:center; opacity:0; transform:translateY(8px); color:var(--cpg-orange); background:#fff; border:1px solid #ffd3c0; border-radius:50%; box-shadow:0 4px 12px rgba(29,33,41,.14); transition:opacity .2s,transform .2s,background-color .2s,border-color .2s; }
.category-product-grid .product-card:hover .cart-button { opacity:1; transform:none; }
.category-product-grid .cart-button:hover { background:var(--cpg-orange); border-color:var(--cpg-orange); }
.category-product-grid .cart-button img { width:20px; height:20px; transition:filter .2s ease; }
.category-product-grid .cart-button:hover img { filter:brightness(0) invert(1); }
.category-product-grid .product-title { margin:0; padding:12px 8px 4px; overflow:hidden; font-size:16px; line-height:24px; text-overflow:ellipsis; white-space:nowrap; }
.category-product-grid .product-title a { color:var(--cpg-text); text-decoration:none; }
.category-product-grid .product-meta { height:29px; padding:0 8px; display:flex; align-items:baseline; gap:8px; }
.category-product-grid .price { color:var(--cpg-orange); font-size:16px; font-weight:600; }
.category-product-grid .price b { font-size:24px; }
.category-product-grid .stock { color:var(--cpg-muted); font-size:14px; white-space:nowrap; }
.category-product-grid .shipping { margin:0; height:24px; padding:5px 8px 0 8px; color:#c9cdd4; font-size:12px; line-height:24px; white-space:nowrap; }

/* 分类页带侧栏或窄屏时自适应列数，与原网格视图列数规则对应 */
@media (min-width:1200px) and (max-width:1399px) { .category-product-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (min-width:768px) and (max-width:1199px) { .category-product-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:767px) { .category-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } }

/* 自适应变体：用于商户首页等嵌套在白色面板内、商品数量不固定的场景 */
.category-product-grid.is-auto { grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); }
