/* 主内容区 */
.page-title {
  margin: 30px 0;
  font-size: 32px;
  color: #2d3436;
  text-align: center;
}

.cart-container {
  display: flex;
  gap: 30px;
  margin-bottom: 50px;
}

.cart-items {
  flex: 3;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.cart-summary {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  align-self: flex-start;
  position: sticky;
  top: 100px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  color: #636e72;
}

.cart-item {
  display: flex;
  padding: 20px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s;
}

.cart-item:hover {
  background-color: #f8f9fa;
}

.item-image {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 20px;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  flex: 1;
}

.item-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2d3436;
}

.item-sku {
  color: #636e72;
  font-size: 14px;
  margin-bottom: 15px;
}

.item-actions {
  display: flex;
  align-items: center;
  margin-top: 15px;
}

.quantity-control {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  background: white;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.quantity-btn:hover {
  background: #f1f2f6;
}

.quantity-input {
  width: 50px;
  height: 32px;
  text-align: center;
  border: 1px solid #ddd;
  margin: 0 5px;
  border-radius: 4px;
  font-size: 16px;
}

.item-price {
  font-size: 20px;
  font-weight: bold;
  color: #e74c3c;
  margin-left: auto;
}

.action-btn {
  background: none;
  border: none;
  color: #636e72;
  cursor: pointer;
  font-size: 16px;
  margin-left: 15px;
  padding: 5px;
  transition: color 0.3s;
}

.action-btn:hover {
  color: #e74c3c;
}

/* 购物车摘要 */
.summary-title {
  font-size: 22px;
  margin-bottom: 20px;
  color: #2d3436;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.summary-label {
  color: #636e72;
}

.summary-value {
  font-weight: 500;
}

.total-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 18px;
  font-weight: bold;
}

.total-value {
  color: #e74c3c;
  font-size: 24px;
}

.checkout-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 25px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(37, 117, 252, 0.3);
}

/* 推荐商品 */
.recommended-section {
  margin-top: 50px;
  margin-bottom: 30px;
}

.section-title {
  font-size: 26px;
  margin-bottom: 30px;
  color: #2d3436;
  text-align: center;
}

.recommended-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  height: 200px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2d3436;
}

.product-price {
  font-size: 20px;
  font-weight: bold;
  color: #e74c3c;
  margin-bottom: 15px;
}

.add-to-cart-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: #f1f2f6;
  color: #2d3436;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
  background: #dfe4ea;
}

/* 空购物车状态 */
.empty-cart {
  text-align: center;
  padding: 60px 20px;
  min-height: 350px;
}

.empty-cart i {
  font-size: 80px;
  color: #b2bec3;
  margin-bottom: 20px;
}

.empty-cart h3 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #2d3436;
}

.empty-cart p {
  color: #636e72;
  margin-bottom: 30px;
  font-size: 18px;
}

.shop-btn {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 18px;
  transition: transform 0.2s;
}

.shop-btn:hover {
  transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .cart-container {
    flex-direction: column;
  }

  .cart-summary {
    width: 100%;
    position: static;
  }

  .cart-item {
    flex-direction: column;
  }

  .item-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
  }

  .item-actions {
    margin-top: 20px;
  }

  .item-price {
    margin-left: 0;
    margin-top: 15px;
  }
  .page-title {
    margin: 10px 0;
    font-size: 22px;
  }
}
