* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f5f5;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-container {
  width: 400px;
  height: 600px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* 主要内容区域 */
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 分类区域 */
.categories {
  width: 100px;
  background-color: #f8f8f8;
  overflow-y: auto;
}

.category-item {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.category-item.active {
  background-color: white;
  border-left-color: #ff6700;
  color: #ff6700;
}

/* 不可点击的分类项 */
.category-item.disabled {
  cursor: default;
  opacity: 0.7;
}

/* 商品列表区域 */
.products {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}

.products-section {
  margin-bottom: 20px;
}

.section-title {
  font-size: 14px;
  color: #666;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}

.product-item {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.product-image {
  width: 80px;
  height: 80px;
  background-color: #f0f0f0;
  border-radius: 5px;
  margin-right: 10px;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 5px;
}

.product-stats {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.product-price {
  font-size: 16px;
  color: #ff6700;
  font-weight: 500;
  margin-right: 10px;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 蓝色加减号按钮 */
.icon-jiahao, 
.icon-jianhao{
  cursor: pointer;
  color: #1890ff;
  font-size: 20px;
}

.increase-btn {
  height: 20px;
}
.decrease-btn {
  display: none;
}

.product-count {
  margin: 0 8px;
  display: none;
  font-size: 14px;
  min-width: 24px;
  align-items: center;
  justify-content: center;
}

/* 新增：当product-item有active类时显示减号和数字 */
.product-item.active .decrease-btn,
.product-item.active .product-count {
  display: flex;
}

/* 结算区域 */
.checkout {
  height: 60px;
  background-color: white;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  padding: 0 15px;
}


/* 购物车样式 */
.cart {
  width: 40px;
  height: 40px;
  background-color: #666;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  cursor: pointer;
  font-size: 20px;
}
.cart.animate{
  animation: animate 0.3s linear;
}
/* 购物车数量增加动画 */
@keyframes animate {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.1);
  }
  75% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff4d4d;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  display: none;
}

.total-amount {
  flex: 1;
  margin-left: 15px;
}

.amount-text {
  font-size: 12px;
  color: #666;
}

.amount-price {
  font-size: 18px;
  color: #666;
  font-weight: 500;
}

.checkout.active .cart{
  background-color: #1890ff;
}
.checkout.active .cart-count{
  display: flex;
}
.checkout.active .amount-price{
  color: #ff4d4d;
}

.checkout-btn {
  width: 120px;
  height: 40px;
  background-color: #ff6700;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
}

.checkout-btn:disabled {
  background-color: #ddd;
  cursor: not-allowed;
}
.jump-to-cart{
  /* position: fixed; */
  position: absolute;
  transition: 1s linear;
}
.jump-to-cart i{
  position: absolute;
  transition: 1s cubic-bezier(0.5,-0.5,1,1);
}

