/* 购物车页面样式 */

/* 顶部导航 */
.page-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 auto;
}

.header-actions {
    margin-left: auto;
}

.icon-btn {
    background: none;
    border: none;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* 空购物车状态 */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    text-align: center;
    padding: 20px;
}

.empty-icon {
    margin-bottom: 20px;
    color: #ddd;
}

.empty-cart h3 {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.empty-cart p {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

/* 购物车容器 */
.cart-container {
    display: none;
    padding-bottom: 120px;
}

/* 购物车商品项 */
.cart-items {
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    position: relative;
}

.item-image {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.item-spec {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-size: 16px;
    color: #e74c3c;
    font-weight: bold;
}

.quantity-control {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
}

.quantity {
    margin: 0 10px;
    min-width: 20px;
    text-align: center;
}

.item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #999;
}

/* 优惠券区域 */
.coupon-section {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.section-header svg {
    margin-right: 8px;
}

.coupon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #fff9f9;
    border: 1px dashed #ffcccc;
    border-radius: 6px;
}

.coupon-info {
    display: flex;
    align-items: center;
}

.coupon-value {
    font-size: 18px;
    color: #e74c3c;
    font-weight: bold;
    margin-right: 10px;
}

.coupon-desc {
    font-size: 12px;
    color: #666;
}

.coupon-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
}

/* 结算栏 */
.checkout-bar {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background-color: white;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 90;
}

.total-info {
    margin-bottom: 15px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.total-row .amount {
    color: #333;
}

.total-row .discount {
    color: #e74c3c;
}

.grand-total {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.checkout-btn {
    width: 100%;
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
}

/* 响应式调整 */
@media (max-width: 350px) {
    .item-image {
        width: 60px;
        height: 60px;
        margin-right: 10px;
    }
    
    .item-name {
        font-size: 14px;
    }
}