/* 购物车页面样式 */

.cart-page {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 100px;
    min-height: 100vh;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
}

.header-steps {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step {
    font-size: 14px;
    color: var(--text-muted);
}

.step.active {
    color: var(--primary);
    font-weight: 600;
}

.step-arrow {
    color: var(--text-muted);
}

/* 购物车内容 */
.cart-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cart-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-gray);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.select-all input {
    width: 18px;
    height: 18px;
}

.col-price {
    width: 120px;
    text-align: center;
}

.col-quantity {
    width: 140px;
    text-align: center;
}

.col-subtotal {
    width: 120px;
    text-align: center;
}

.col-action {
    width: 60px;
    text-align: center;
}

/* 购物车项 */
.cart-items {
    padding: 0 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-select {
    margin-right: 16px;
}

.item-select input {
    width: 18px;
    height: 18px;
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    flex: 1;
    margin-left: 16px;
    min-width: 0;
}

.item-name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-name:hover {
    color: var(--primary);
}

.item-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.item-price {
    width: 120px;
    text-align: center;
    font-size: 15px;
    color: var(--text-primary);
}

.item-quantity {
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-quantity button {
    width: 32px;
    height: 32px;
    font-size: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.item-quantity button:hover {
    background: var(--border);
}

.item-quantity input {
    width: 50px;
    height: 32px;
    text-align: center;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 0 4px;
}

.item-subtotal {
    width: 120px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--danger);
}

.item-action button {
    width: 32px;
    height: 32px;
    font-size: 18px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.item-action button:hover {
    color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    text-align: center;
}

.empty-state i {
    font-size: 80px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* 底部结算栏 */
.cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.cart-footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.cart-footer-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-text {
    font-size: 14px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
}

.btn-text:hover {
    color: var(--danger);
}

.cart-footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.cart-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.total-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--danger);
}

/* 响应式 */
@media (max-width: 768px) {
    .header-steps {
        display: none;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        flex-wrap: wrap;
        padding: 16px;
        background: var(--bg-gray);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
    }
    
    .item-select {
        position: absolute;
        top: 16px;
        left: 16px;
    }
    
    .item-image {
        width: 100px;
        height: 100px;
        margin-left: 32px;
    }
    
    .item-info {
        flex: 1;
        margin-left: 12px;
    }
    
    .item-price,
    .col-price {
        display: none;
    }
    
    .item-quantity {
        width: 100%;
        justify-content: flex-start;
        margin-top: 12px;
        margin-left: 32px;
    }
    
    .item-subtotal {
        width: auto;
        margin-left: auto;
        font-size: 18px;
    }
    
    .item-action {
        position: absolute;
        top: 16px;
        right: 16px;
    }
    
    .cart-footer-content {
        padding: 0 16px;
    }
    
    .cart-footer-left {
        gap: 16px;
    }
    
    .btn-text {
        display: none;
    }
}
