.cart-container,
.cart-item,
.cart-summary {
    --primary-color: #e74c8c;
    --primary-dark: #d43d7a;
    --primary-light: #f66fa4;
    --secondary-color: #7ac142;
    --top-bar-bg: #5a5a5a;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

.cart-container {
    margin-top: 2rem;
    margin-bottom: 7rem;
}

.cart-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cart-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(231, 76, 140, 0.15);
}

.product-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.product-info h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.quantity-select {
    border: 1px solid rgba(231, 76, 140, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-dark);
    font-weight: 500;
}

.quantity-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 140, 0.25);
}

.price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    transition: var(--transition);
}

.remove-btn:hover {
    color: #c82333;
    transform: scale(1.1);
}

.cart-summary {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    padding-top: 1rem;
}

.discount-input {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.discount-input input {
    border: 2px solid rgba(231, 76, 140, 0.2);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    width: auto;
}

.discount-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 140, 0.25);
    outline: none;
}

.cart-container .btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cart-container .btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 140, 0.3);
}

.cart-container .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
    background: transparent;
}

.cart-container .btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 140, 0.3);
}

/* 次要按鈕樣式 (使用綠色) */
.cart-container .btn-secondary {
    background: var(--secondary-color);
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: var(--transition);
    color: var(--white);
}

.cart-container .btn-secondary:hover {
    background: #6ab135;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 193, 66, 0.3);
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

/* 購物車標題區域 */
.cart-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.cart-header h2 {
    color: var(--text-dark);
    font-weight: 700;
}

/* 折扣標籤 */
.discount-badge {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-left: 0.5rem;
}

/* 特價標籤 */
.sale-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-left: 0.5rem;
}

/* 數量控制按鈕 */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.quantity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .cart-item {
        padding: 1rem;
    }

    .product-image {
        width: 80px;
        height: 80px;
    }

    .cart-summary {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }

    .cart-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .cart-container {
        margin-top: 1rem;
        margin-bottom: 5rem;
    }

    .product-image {
        width: 60px;
        height: 60px;
    }

    .price {
        font-size: 1rem;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .summary-row:last-child {
        font-size: 1.1rem;
    }

    .cart-container .btn-primary,
    .cart-container .btn-outline-primary,
    .cart-container .btn-secondary {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}
