/* 整体背景渐变，可以根据需要调整或移除 */
.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-scroll {
  overflow-x: auto; /* 如果需要横向滚动 */
  width: 100%;
}

.category-scroll-inner {
  width: 100%;
}

.category-row {
  margin: 0;
}

.category-col {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 16px; 
  max-width: 25%; /* 确保每个列最大宽度为25%，即四个一行 */
  flex: 0 0 25%; /* 防止列自动扩展 */
}

.category-item {
  display: flex;
  flex-direction: column; /* 垂直排列：图片在上，文字在下 */
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer; /* 可选：让鼠标移上去有点击手势 */
  width: 100%; /* 占满整个列 */
}

.category-image-wrapper {
  width: 80px; /* 设定一个固定的宽度和高度 */
  height: 80px;
}

.category-image {
  width: 100%;
  height: 100%;
  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: 8px 0; /* 调整上下间距 */
}

.product-card-header {
  background: #348ef5;
  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;
  flex-direction: column; /* 竖直排列图片和信息 */
  align-items: center; /* 居中对齐 */
  padding: 12px;
}

.product-image-wrapper {
  width: 100%;
  height: 120px; /* 增大图片高度以适应网格布局 */
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px; /* 增加底部间距 */
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  width: 100%;
  text-align: 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;
}