:root {
    --primary: #FF4500;
    --bg: #f2f2f4;
}

body { font-family: -apple-system, sans-serif; background: var(--bg); margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 30px; }

.hero { background: var(--primary); color: white; padding: 30px 0; text-align: center; }
.hero h1 { margin: 0; font-size: 24px; }

.filter-bar { 
    background: white; padding: 12px; border-radius: 8px; 
    margin: -20px auto 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    display: flex; flex-wrap: wrap; gap: 8px; 
}
.filter-bar select { flex: 1; min-width: 120px; padding: 8px; border: 1px solid #eee; border-radius: 4px; font-size: 13px; }

.grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; /* 减小卡片间距 */
    padding-bottom: 30px;
}

.card { background: white; border-radius: 6px; overflow: hidden; border: 1px solid #eee; display: flex; flex-direction: column; transition: 0.2s; }
.card.P0 { border: 1px solid var(--primary); }

/* 图片区域压缩：减少留白 */
.img-container { 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.card-img { width: 100%; height: 100%; object-fit: cover; } /* cover模式填满正方形，无留白 */

.card-content { padding: 10px; flex-grow: 1; display: flex; flex-direction: column; }
.category { font-size: 10px; color: #bbb; margin-bottom: 4px; }

/* 标题区域：P0标签移动到这里 */
.title-wrap { 
    height: 36px; /* 进一步压缩高度 */
    overflow: hidden;
    margin-bottom: 8px;
    line-height: 1.3;
}
.p-tag { 
    display: inline-block;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
    background: #666;
    color: #fff;
    vertical-align: middle;
}
.P0 .p-tag { background: #ff0000; }
.title-text { font-size: 13px; font-weight: 600; color: #333; vertical-align: middle; }

/* 价格区域强化 */
.price-section { background: #fff8f5; padding: 6px 8px; border-radius: 4px; margin-bottom: 8px; }
.main-price { color: var(--primary); font-weight: bold; font-size: 14px; }
.sub-price { 
    color: #888; 
    font-size: 12px; /* 增大字号 */
    margin-top: 2px; 
    font-weight: 600; /* 加粗 */
    display: block;
}

/* 按钮压缩尺寸 */
.btn-main { 
    display: block; background: var(--primary); color: white; 
    text-align: center; padding: 6px; border-radius: 4px; 
    text-decoration: none; font-size: 12px; font-weight: bold;
}
.btn-main.disabled { background: #eee; color: #ccc; pointer-events: none; }

@media (max-width: 800px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .container { padding: 0 10px; }
}
