/* cart.css - 购物车页面专用样式 */

.cart-page {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.cart-table th {
    background: var(--primary);
    color: white;
    padding: 20px;
    text-align: left;
    font-weight: 500;
}

.cart-table td {
    padding: 20px;
    border-bottom: 1px solid var(--accent-1);
}

.product-cell {
    display: flex;
    align-items: center;
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    margin-right: 20px;
    background: var(--accent-1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image i {
    font-size: 2rem;
    color: var(--primary);
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}

.product-category {
    color: var(--medium);
    font-size: 0.9rem;
}

.quantity-cell {
    display: flex;
    align-items: center;
}

.table-quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--accent-1);
    border-radius: 30px;
    padding: 5px 15px;
}

.price-cell {
    font-weight: 600;
    color: var(--primary);
}

.subtotal-cell {
    font-weight: 700;
    color: var(--dark);
}

.remove-cell {
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--medium);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    color: #e74c3c;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.continue-shopping {
    display: flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.continue-shopping i {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.continue-shopping:hover i {
    transform: translateX(-5px);
}

.update-cart {
    background: var(--accent-1);
    color: var(--dark);
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.update-cart:hover {
    background: var(--primary);
    color: white;
}

.cart-totals {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin-left: auto;
}

.cart-totals h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--accent-1);
}

.totals-table {
    width: 100%;
    margin-bottom: 30px;
}

.totals-table td {
    padding: 10px 0;
}

.totals-label {
    color: var(--medium);
}

.totals-value {
    text-align: right;
    font-weight: 500;
    color: var(--dark);
}

.total-row {
    font-weight: 700;
    font-size: 1.2rem;
}

.total-row .totals-value {
    color: var(--primary);
}

.proceed-checkout {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

/* 购物车页面响应式调整 */
@media (max-width: 992px) {
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 20px;
    }
    
    .cart-totals {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .product-cell {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-image {
        margin-bottom: 15px;
    }
    
    .cart-table th, .cart-table td {
        padding: 15px 10px;
    }
}