/* ============================================
   购物车页面样式 - 主流电商风格
   ============================================ */

   .main-content {
    padding: 30px 0 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    padding: 10px 0 20px;
    font-size: 13px;
    color: #888;
}

.breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #DD302D;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* ========== 页面标题 ========== */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    color: #666;
}

/* ========== PC端购物车表格 ========== */
.desktop-cart {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 30px;
}

.cart-header {
    display: flex;
    background: #f8f9fa;
    padding: 14px 20px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.cart-col {
    padding: 0 10px;
}

.product-col {
    flex: 3;
}

.price-col {
    flex: 1;
    text-align: center;
}

.quantity-col {
    flex: 1;
    text-align: center;
}

.subtotal-col {
    flex: 1;
    text-align: center;
}

.action-col {
    flex: 0.5;
    text-align: center;
}

/* 购物车商品行 */
.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.cart-item:hover {
    background: #fafafa;
}

/* 商品信息 */
.product-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-image {
    flex-shrink: 0;
}

.product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #eee;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.product-name:hover {
    color: #DD302D;
}

.product-stuff {
    font-size: 12px;
    color: #888;
}

/* 价格列 */
.price-col {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* 数量选择器 */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 2px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.quantity-input {
    width: 45px;
    height: 30px;
    text-align: center;
    border: none;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
}

.quantity-input:focus {
    outline: none;
}

/* 小计列 */
.subtotal-col {
    font-size: 16px;
    font-weight: 600;
    color: #DD302D;
    text-align: center;
}

/* 删除按钮 */
.action-col {
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    transition: color 0.2s;
    padding: 8px;
    border-radius: 50%;
}

.remove-item:hover {
    color: #DD302D;
    background: #fef0ef;
}

/* 购物车底部 */
.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fafafa;
    border-top: 1px solid #e9ecef;
}

.btn-continue {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-continue:hover {
    color: #DD302D;
}

.cart-summary {
    text-align: right;
}

.cart-total {
    font-size: 18px;
}

.total-label {
    font-weight: 500;
    color: #333;
    margin-right: 10px;
}

.total-amount {
    font-size: 22px;
    font-weight: 700;
    color: #DD302D;
}

/* ========== 手机端购物车 ========== */
.mobile-cart {
    display: none;
    margin-bottom: 20px;
}

.mobile-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 15px;
}

.mobile-item-image {
    flex-shrink: 0;
}

.mobile-item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f9fa;
}

.mobile-item-details {
    flex: 1;
}

.mobile-item-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.mobile-item-name:hover {
    color: #DD302D;
}

.mobile-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #DD302D;
    margin-bottom: 10px;
}

.mobile-item-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-item-subtotal {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mobile-remove-item {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 0;
}

.mobile-remove-item:hover {
    color: #DD302D;
}

/* 手机端总计（独立一行） */
.mobile-cart-total {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
}

.mobile-total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #DD302D;
}

/* ========== 结算区域（PC和手机共用） ========== */
.checkout-section {
    margin-top: 20px;
}

.checkout-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    align-items: center;
}

.btn-secondary {
    padding: 12px 24px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-primary {
    padding: 12px 32px;
    background: #DD302D;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #b02623;
    transform: translateY(-1px);
}

/* ========== 空购物车 ========== */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
}

.empty-cart-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.empty-cart p {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
}

.btn-start-shopping {
    display: inline-block;
    padding: 12px 28px;
    background: #DD302D;
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-start-shopping:hover {
    background: #b02623;
    transform: translateY(-2px);
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .desktop-cart {
        display: none;
    }
    
    .mobile-cart {
        display: block;
    }
    
    .checkout-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 0 40px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .mobile-item-image img {
        width: 80px;
        height: 80px;
    }
    
    .mobile-item-name {
        font-size: 14px;
    }
    
    .mobile-item-price {
        font-size: 15px;
    }
    
    .btn-secondary, .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .mobile-cart-total {
        font-size: 15px;
        padding: 14px 16px;
    }
    
    .mobile-total-amount {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .mobile-cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .mobile-item-quantity {
        justify-content: center;
        gap: 15px;
    }
    
    .mobile-remove-item {
        justify-content: center;
        width: 100%;
    }
    
    .checkout-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-secondary, .btn-primary {
        width: 100%;
        text-align: center;
    }
    
    .mobile-cart-total {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}