* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial;
}
body{
  background:#f5f5f5;
  padding-bottom:80px;
}
.nav{
  background:#222;
  color:#fff;
  padding:16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.cart-icon{
  cursor:pointer;
  font-size:18px;
}
.filter{
  padding:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.filter button{
  padding:8px 12px;
  border:none;
  background:#333;
  color:#fff;
  border-radius:4px;
}
#productList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}
.product-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.product-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display:block;
}
.opt{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.add-btn{
  border:none;
  background:#0088cc;
  color:#fff;
  padding:8px;
  border-radius:4px;
  cursor:pointer;
}
.cart-panel{
  position:fixed;
  right:0;
  top:0;
  width:340px;
  height:100vh;
  background:#fff;
  display:none;
  flex-direction:column;
  border-left:1px solid #ddd;
}
.cart-head{
  padding:16px;
  display:flex;
  justify-content:space-between;
  border-bottom:1px solid #ddd;
}
#cart-body{
  flex:1;
  padding:12px;
  overflow-y:auto;
}
.cart-row{
  padding:8px 0;
  border-bottom:1px solid #eee;
  display:flex;
  justify-content:space-between;
  gap:8px;
}
.cart-footer{
  padding:16px;
  border-top:1px solid #ddd;
}
.checkout-btn{
  width:100%;
  border:none;
  background:#25D366;
  color:#fff;
  padding:12px;
  border-radius:6px;
  font-size:16px;
  cursor:pointer;
}
@media (max-width: 600px) {
  #productList {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
  }
  .product-item img {
    height: 120px;
  }
  .product-item h3 {
    font-size: 12px;
    height: 32px;
    line-height: 16px;
  }
  .product-item select,
  .product-item input {
    font-size: 11px;
    padding: 4px 2px;
  }
  .product-item button {
    font-size: 11px;
    padding: 6px;
  }
}
/* 【了解更多】悬浮按钮，在购物车上方 */
.float-wa-btn {
  position: fixed;
  right: 20px;
  bottom: 82px;
  background: #ff7800;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 999;
  font-size: 15px;
  transition: all 0.2s ease; /* 过渡动画 */
}
.float-wa-btn:hover {
  background: #e66b00;
  transform: translateY(-4px); /* 鼠标悬浮向上浮4px */
  box-shadow: 0 8px 18px rgba(0,0,0,0.25); /* 阴影变大，卡片浮起来的感觉 */
}
/* 购物车悬浮按钮 */
.float-cart-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #25D366;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 999;
  font-size: 16px;
}
.float-cart-btn:hover {
  background: #1da851;
}
/* 手机端适配 */
@media (max-width: 600px) {
  .float-wa-btn {
    padding: 10px 14px;
    font-size: 13px;
    right: 14px;
    bottom: 72px;
  }
  .float-cart-btn {
    padding: 12px 16px;
    font-size: 14px;
    right: 14px;
    bottom: 14px;
  }
}
