/* ========================================
   购物车页面样式
   ======================================== */

/* 地址栏 */
.cart-address {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff7e6 0%, #fff);
    padding: 16px;
    margin: 12px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--warning);
}

.address-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.address-info {
    flex: 1;
}

.address-top {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

.address-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.address-phone {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.address-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.address-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* 购物车列表 */
.cart-list {
    margin: 0 12px 100px;
}

.cart-item {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.item-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.item-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.item-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-spec {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-size: 1.1rem;
    color: var(--error);
    font-weight: bold;
}

.item-price.free {
    color: var(--success);
}

.item-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
}

.qty-value {
    width: 36px;
    text-align: center;
    font-size: 0.9rem;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* 空购物车 */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.btn-go-shop {
    padding: 12px 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-xl);
    font-size: 1rem;
}

/* 推荐商品 */
.recommend-section {
    margin: 12px;
    padding-bottom: 100px;
}

.recommend-title {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-left: 4px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.recommend-item {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.recommend-img {
    height: 120px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 10px;
}

.recommend-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.recommend-price {
    font-size: 1rem;
    color: var(--error);
    font-weight: bold;
}

/* 底部结算栏 */
.cart-footer {
    position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 99;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.total-info {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.total-price {
    font-size: 1.3rem;
    color: var(--error);
    font-weight: bold;
}

.total-desc {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.btn-settlement {
    padding: 12px 32px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: white;
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 500;
}

.btn-settlement:disabled {
    background: var(--text-muted);
}

.btn-delete {
    padding: 12px 32px;
    background: var(--error);
    color: white;
    border-radius: var(--radius-xl);
    font-size: 1rem;
}
