/* ========== 购物车页样式 ========== */
.cart-page {
    padding: 20px 0 120px;
    min-height: 600px;
}

.cart-title {
    font-size: 22px;
    color: var(--text-1);
    margin-bottom: 16px;
    font-weight: 700;
}

.cart-count {
    font-size: 14px;
    color: var(--text-3);
    font-weight: 400;
    margin-left: 8px;
}

/* 步骤 */
.cart-step {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 13px;
}

.step.active {
    color: var(--primary);
    font-weight: 600;
}

.step.done {
    color: var(--text-2);
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--line);
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.step.active .step-num {
    background: var(--primary);
    color: #fff;
}

.step.done .step-num {
    background: var(--primary);
    color: #fff;
}

.step-line {
    width: 60px;
    height: 1px;
    background: var(--line);
    margin: 0 12px;
}

.step.done + .step-line {
    background: var(--primary);
}

/* 购物车表格 */
.cart-wrap {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-header, .cart-item {
    display: grid;
    grid-template-columns: 60px 460px 140px 160px 140px 100px;
    align-items: center;
    padding: 14px 20px;
}

.cart-header {
    background: var(--bg-soft);
    font-size: 13px;
    color: var(--text-2);
    border-bottom: 1px solid var(--line);
}

.col-product { padding-left: 10px; }
.col-price, .col-total { text-align: center; }
.col-qty { text-align: center; }
.col-op { text-align: center; }

.check-all, .check-item {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-2);
    justify-content: center;
}

.check-all {
    justify-content: flex-start;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* 店铺 */
.cart-store {
    border-bottom: 1px solid var(--line);
}

.cart-store:last-child {
    border-bottom: none;
}

.store-head {
    background: #FAFCFC;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px dashed var(--line);
}

.store-head i {
    color: var(--secondary);
}

.store-name {
    color: var(--text-1);
    font-weight: 600;
    font-size: 14px;
}

.store-vip {
    background: linear-gradient(90deg, #F59E0B, #FF8C42);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
}

/* 商品项 */
.cart-item {
    padding: 20px;
    border-bottom: 1px dashed var(--line);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.2);
    margin-right: 16px;
    flex-shrink: 0;
}

.item-img i {
    font-size: 40px;
}

.item-info {
    flex: 1;
}

.item-info h3 {
    font-size: 14px;
    color: var(--text-1);
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
}

.item-info h3 a:hover {
    color: var(--primary);
}

.item-attrs {
    color: var(--text-3);
    font-size: 12px;
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}

.item-promo {
    background: #FFF8F0;
    color: var(--secondary);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.item-price {
    color: var(--text-1);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.item-qty {
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-qty .qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-2);
    cursor: pointer;
}

.item-qty .qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.item-qty .qty-input {
    width: 50px;
    height: 28px;
    border: 1px solid var(--line);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 13px;
}

.item-total {
    color: var(--secondary);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.item-op {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.item-op a {
    color: var(--text-2);
    transition: color 0.2s;
}

.item-op a:hover {
    color: var(--primary);
}

.item-op .delete:hover {
    color: var(--danger);
}

/* 推荐 */
.cart-recommend {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

.cart-recommend h3 {
    font-size: 18px;
    color: var(--text-1);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.rec-card {
    border-radius: 8px;
    transition: all 0.2s;
    padding: 8px;
}

.rec-card:hover {
    background: var(--bg-soft);
}

.rec-img {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
}

.rec-img i {
    font-size: 56px;
}

.rec-card h4 {
    font-size: 13px;
    color: var(--text-1);
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-price {
    color: var(--secondary);
    font-size: 16px;
    font-weight: 700;
}

/* 结算栏 */
.cart-checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 50;
    height: 64px;
    line-height: 64px;
}

.checkout-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.batch-op {
    color: var(--text-2);
    font-size: 13px;
    transition: color 0.2s;
}

.batch-op:hover {
    color: var(--primary);
}

.checkout-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.checkout-stat {
    color: var(--text-2);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.checkout-stat em {
    font-style: normal;
    margin: 0 4px;
}

.stat-num {
    color: var(--secondary);
    font-weight: 700;
    font-size: 16px;
}

.stat-total {
    color: var(--secondary);
    font-weight: 700;
    font-size: 22px;
}

.stat-save {
    color: var(--primary);
    font-size: 12px;
    background: var(--primary-bg);
    padding: 2px 8px;
    border-radius: 3px;
    line-height: 1.4;
    align-self: center;
}

.btn-checkout {
    background: linear-gradient(90deg, var(--secondary) 0%, #FFA866 100%);
    color: #fff;
    height: 48px;
    padding: 0 40px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
    line-height: 48px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 140, 66, 0.4);
}
