// 整体背景渐变,可以根据需要调整或移除 .content-background { background: linear-gradient(to bottom, #e0f7fa, #ffffff); --padding-bottom: 0; } // 标题栏相关样式 .custom-toolbar { --background: transparent; display: flex; justify-content: center; align-items: center; padding: 0; border-bottom: none; } .custom-title { font-size: 1.4em; font-weight: bold; color: #000; text-align: center; margin: 0; font-family: "微软雅黑", sans-serif; } // 搜索栏区域样式 .search-container { padding: 0 16px; margin-top: 8px; } .custom-searchbar { --background: #ffffff; --border-radius: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); } // 分类区域(可横向滚动) .category-row { margin: 0; } .category-col { display: flex; justify-content: center; align-items: center; text-align: center; margin-bottom: 16px; } .category-item { display: flex; flex-direction: column; /* 垂直排列:图片在上,文字在下 */ align-items: center; justify-content: center; text-align: center; cursor: pointer; /* 可选:让鼠标移上去有点击手势 */ } .category-image { max-width: 90%; max-height: 90%; object-fit: contain; } .category-text { font-size: 14px; color: #333; font-weight: 500; text-align: center; white-space: normal; max-width: 100%; } // 商品列表区域样式 .product-container { padding: 0 16px; margin-top: 16px; } .product-card { border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 16px; } .product-card-header { background: #ffeb3b; border-top-left-radius: 12px; border-top-right-radius: 12px; display: flex; align-items: center; padding: 8px 12px; } .product-tag { font-size: 14px; font-weight: bold; color: #333; } .product-card-content { display: flex; align-items: center; padding: 12px; } .product-image-wrapper { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; margin-right: 12px; } .product-image { width: 100%; height: 100%; object-fit: cover; } .product-info { flex: 1; display: flex; flex-direction: column; justify-content: center; } .product-name { font-size: 16px; font-weight: bold; color: #333; white-space: normal; word-break: break-all; margin-bottom: 4px; } .product-price { font-size: 14px; color: #e53935; font-weight: bold; } // 底部弹窗(modal)样式 .bottom-modal { --height: 75vh; --width: 100%; --border-radius: 20px 20px 0 0; --offset-y: calc(100% - 75vh); } .modal-content { padding: 16px; } .image-container { display: flex; justify-content: center; margin-bottom: 16px; } .medicine-image { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; }