* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f7fa; color: #333; }
a { text-decoration: none; color: inherit; }

.header { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 64px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 100; }
.header-logo { display: flex; align-items: center; gap: 12px; }
.header-logo img { border-radius: 8px; }
.header-logo-name { font-size: 18px; font-weight: 600; color: #409eff; }
.header-nav { border-bottom: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.notice-card { margin-bottom: 16px; }
.notice-card ul { padding-left: 20px; line-height: 1.8; }
.search-card { margin-bottom: 16px; }

.cate-sidebar { background: #fff; border-radius: 8px; padding: 12px 0; }
.cate-item { padding: 10px 20px; cursor: pointer; display: flex; justify-content: space-between; transition: background .2s; }
.cate-item:hover, .cate-item.active { background: #ecf5ff; color: #409eff; }

.goods-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.goods-item { background: #fff; border-radius: 8px; overflow: hidden; transition: box-shadow .2s, transform .2s; border: 1px solid #ebeef5; }
.goods-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); transform: translateY(-2px); }
.goods-link { display: block; padding: 16px; }
.goods-image { width: 48px; height: 48px; background: #f0f2f5; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.goods-image .icon { width: 28px; height: 28px; fill: #409eff; }
.goods-title { font-size: 14px; line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 63px; }
.goods-info { display: flex; justify-content: space-between; align-items: center; }
.goods-price { color: #f56c6c; font-size: 18px; font-weight: 600; }
.goods-count { color: #909399; font-size: 13px; }

.layout { display: flex; gap: 20px; }
.layout-side { width: 220px; flex-shrink: 0; }
.layout-main { flex: 1; min-width: 0; }

.goods-image .icon { width: 28px; height: 28px; }
.icon { display: inline-block; width: 1em; height: 1em; fill: currentColor; vertical-align: -0.15em; overflow: hidden; }
.cate-item-label { display: flex; align-items: center; gap: 8px; }
.cate-icon { flex-shrink: 0; }
.product-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.product-icon { width: 64px; height: 64px; background: #f0f2f5; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.product-icon .icon { width: 40px; height: 40px; }

/* Product detail */
.product-detail { background: #fff; border-radius: 8px; padding: 24px; }
.product-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; line-height: 1.5; }
.product-price { color: #f56c6c; font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.product-stock { color: #909399; margin-bottom: 24px; }
.buy-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid #ebeef5; }
.payment-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.payment-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.payment-name { font-weight: 500; }

/* Order */
.order-card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.order-status { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; }
.order-status.pending { background: #fdf6ec; color: #e6a23c; }
.order-status.paid { background: #f0f9eb; color: #67c23a; }
.card-content { background: #f5f7fa; padding: 16px; border-radius: 6px; margin-top: 12px; font-family: monospace; white-space: pre-wrap; word-break: break-all; }

.footer { text-align: center; padding: 40px 20px; color: #909399; font-size: 13px; }

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .layout-side { width: 100%; }
  .goods-list { grid-template-columns: 1fr; }
  .header { padding: 0 12px; }
}
