/* 节能门窗小程序样式 */
:root {
  --primary-color: #FF5000; /* 淘宝橙色 */
  --secondary-color: #FF8C00;
  --text-color: #333;
  --light-text: #666;
  --lighter-text: #999;
  --background-color: #f5f5f5;
  --white: #fff;
  --border-color: #eee;
  --success-color: #07c160;
  --warning-color: #ff976a;
  --error-color: #ee0a24;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
}

.page-container {
  max-width: 414px;  /* iPhone 15 Pro 宽度 */
  height: 896px;     /* 模拟高度 */
  margin: 0 auto;
  background-color: var(--white);
  position: relative;
  overflow: hidden;
  border-radius: 44px; /* 模拟iPhone圆角 */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.status-bar {
  height: 44px;
  background-color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: var(--white);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-color);
  z-index: 90;
}

.tab-bar-item {
  flex: 1;
  text-align: center;
  color: var(--light-text);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tab-bar-item.active {
  color: var(--primary-color);
}

.tab-bar-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.content {
  height: calc(896px - 44px - 50px);
  overflow-y: auto;
  position: relative;
}

/* 公共组件 */
.btn {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 15px;
  border-radius: 4px;
  border: none;
  text-align: center;
  cursor: pointer;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.card {
  background-color: var(--white);
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 首页样式 */
.banner {
  width: 100%;
  height: 180px;
  background-color: #f8f8f8;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-title {
  font-size: 16px;
  font-weight: bold;
  margin: 15px 10px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title .more {
  font-size: 12px;
  color: var(--light-text);
  font-weight: normal;
}

.policy-item {
  display: flex;
  padding: 12px;
  background: var(--white);
  margin-bottom: 8px;
  border-radius: 8px;
}

.policy-item .date {
  color: var(--lighter-text);
  font-size: 12px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 10px;
}

.product-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.product-info {
  padding: 8px;
}

.product-title {
  font-size: 14px;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  color: var(--primary-color);
  font-size: 16px;
  font-weight: bold;
}

.product-price .original {
  text-decoration: line-through;
  color: var(--lighter-text);
  font-size: 12px;
  font-weight: normal;
  margin-left: 5px;
}

.tag {
  display: inline-block;
  padding: 2px 5px;
  font-size: 10px;
  color: var(--white);
  background-color: var(--primary-color);
  border-radius: 2px;
  margin-right: 5px;
}

/* 商品详情 */
.product-detail-images {
  width: 100%;
  height: 300px;
  background-color: #f8f8f8;
}

.product-detail-info {
  padding: 15px;
  background-color: var(--white);
}

.product-detail-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.product-detail-price {
  color: var(--primary-color);
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

.product-detail-action {
  display: flex;
  position: fixed;
  bottom: 50px;
  left: 0;
  width: 100%;
  background-color: var(--white);
  padding: 10px;
  border-top: 1px solid var(--border-color);
  z-index: 95;
  box-sizing: border-box;
}

.action-btn {
  flex: 1;
  margin: 0 5px;
  padding: 10px 0;
  text-align: center;
  border-radius: 20px;
}

/* 企业列表 */
.company-item {
  display: flex;
  padding: 15px;
  background-color: var(--white);
  margin-bottom: 10px;
  border-radius: 8px;
}

.company-logo {
  width: 60px;
  height: 60px;
  margin-right: 10px;
  border-radius: 4px;
  background-color: #f8f8f8;
}

.company-info {
  flex: 1;
}

.company-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.company-desc {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cert-icon {
  color: var(--success-color);
  font-size: 14px;
  margin-right: 5px;
}

/* 拼团 */
.group-banner {
  width: 100%;
  height: 120px;
  background-color: #ffe4db;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 24px;
}

.group-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 15px;
  font-size: 12px;
}

.group-item {
  display: flex;
  padding: 15px;
  background-color: var(--white);
  margin-bottom: 10px;
  border-radius: 8px;
}

.group-product-img {
  width: 80px;
  height: 80px;
  margin-right: 10px;
  border-radius: 4px;
  background-color: #f8f8f8;
}

.group-product-info {
  flex: 1;
}

.group-product-title {
  font-size: 14px;
  margin-bottom: 5px;
}

.group-progress {
  height: 5px;
  background-color: #f5f5f5;
  border-radius: 2.5px;
  margin: 10px 0;
  overflow: hidden;
}

.group-progress-bar {
  height: 100%;
  background-color: var(--primary-color);
}

/* 购物车 */
.cart-item {
  display: flex;
  padding: 15px;
  background-color: var(--white);
  margin-bottom: 10px;
  border-radius: 8px;
}

.cart-checkbox {
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.cart-product-img {
  width: 80px;
  height: 80px;
  margin-right: 10px;
  border-radius: 4px;
  background-color: #f8f8f8;
}

.cart-product-info {
  flex: 1;
}

.cart-action {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.cart-counter {
  display: flex;
  align-items: center;
}

.cart-counter button {
  width: 25px;
  height: 25px;
  border: 1px solid var(--border-color);
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-counter input {
  width: 35px;
  height: 25px;
  border: 1px solid var(--border-color);
  border-left: none;
  border-right: none;
  text-align: center;
}

.cart-footer {
  position: fixed;
  bottom: 50px;
  left: 0;
  width: 100%;
  background-color: var(--white);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  z-index: 95;
  box-sizing: border-box;
}

.cart-total {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: bold;
}

/* 我的页面 */
.user-header {
  background-color: var(--primary-color);
  padding: 30px 15px;
  display: flex;
  align-items: center;
  color: var(--white);
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #f8f8f8;
  margin-right: 15px;
}

.user-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.user-info {
  font-size: 12px;
}

.menu-list {
  margin-top: 15px;
  background-color: var(--white);
  border-radius: 8px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item-title {
  display: flex;
  align-items: center;
}

.menu-item-icon {
  width: 24px;
  text-align: center;
  margin-right: 10px;
  font-size: 18px;
  color: var(--light-text);
}

/* 消息页面 */
.message-list {
  background-color: var(--white);
}

.message-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.message-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f8f8f8;
  margin-right: 15px;
}

.message-content {
  flex: 1;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.message-time {
  font-size: 12px;
  color: var(--lighter-text);
}

.message-text {
  font-size: 14px;
  color: var(--light-text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
} 