/* 基础分类导航 */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}
.category-nav button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}
.category-nav button:hover, .category-nav button.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 商品网格布局 */
.goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.goods-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.goods-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.goods-card img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 15px;
}
.goods-card h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.goods-card .price {
    color: #e53935;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}
.goods-card .stock {
    color: #888;
    font-size: 12px;
    margin-bottom: 15px;
}
.goods-card .buy-btn {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.goods-card .buy-btn:hover {
    background: #0056b3;
}

/* 遮罩与弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.order-modal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}
.order-modal h2 { margin-top: 0; font-size: 20px; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #555; }
.form-group input, .form-group select {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box;
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border: none; border-radius: 5px; cursor: pointer; }
.btn-submit { background: #28a745; color: white; }
.btn-cancel { background: #f8f9fa; border: 1px solid #ddd; color: #333; }